Would something like:
reg add HKLM\Software\Microsoft\Windows\CurrentVersion\Run\ /v %keyname% /t REG_SZ /d "%expath%"
require administrator privileges to be able to execute from a batch file?
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
Whether it requires admin permissions or not, is not the actual question you need to ask.
Registry keys, just like the NTFS file system, have Access Control Lists controlling who has access to that particular key.
You can check the permissions of the registry key by right-clicking it in regedit and choosing properties. If the user or group you intend to run the batch file under does not have appropriate access to the key, it will not be able to modify it. It’s possible that even the administrator doesn’t have access to the key.
Typically, HKLM is the computer wide settings that require admin permissions. The HKCU key is per user and the user usually has full control on those keys.