Aaron Johnson
Aaron Johnson

Reputation: 23

Need help adding registry key via batch file

I am trying to add the following registry key through cmd. I am not able to get other users to be able to add this registry key using regedit.exe /s "Location\Project.reg".

[HKEY_CURRENT_USER\Software\Autodesk\Fabrication 2014\Configuration\1011-Shady-Grove] "Path"="C:/Autodesk/Profiles/05MA/1011-Shady-Grove"

Upvotes: 2

Views: 15058

Answers (2)

David Heffernan
David Heffernan

Reputation: 612794

You are using the wrong tool. Regedit is a GUI tool. Yes you can use the /s switch, but fundamentally this is the wrong tool. Plus it is built with the highestAvailable option in the UAC manifest.

What you need is reg. Use it like this:

reg add "HKCU\Software\Autodesk\Fabrication 2014\Configuration\1011-Shady-Grove" /v Path /d C:/Autodesk/Profiles/05MA/1011-Shady-Grove

Upvotes: 4

Guntram Blohm
Guntram Blohm

Reputation: 9819

AFAIK, regedit will refuse to do anything if the user doesn't have administrative access, even if he has access to the registry keys.

Try the reg add command.

Upvotes: 2

Related Questions