Hello everyone,
Am trying to create a batch file with the following command in Windows 7:
REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Group Policy Objects\{A711A0A8-6020-4FB1-A477-4E550E2FBE76}Machine\Software\Policies\Microsoft\Windows\DeviceInstall\Restrictions /v AllowAdminInstall /t REG_DWORD /d 1
However it is giving an invalid syntax error message. I tried running the command
inside the command prompt as an admin.
Even adding “” does not help. For eg.REG ADD “HKCU\Software\Microsoft\Windows\CurrentVersion\Group Policy Objects\{A711A0A8-6020-4FB1-A477-4E550E2FBE76}Machine\Software\Policies\Microsoft\Windows\DeviceInstall\Restrictions /v AllowAdminInstall /t REG_DWORD /d 1” adds a subkey on the left hand side named /v AllowAdminInstall /t REG_DWORD /d 1 instead of creating a value named AllowAdminInstall on the right hand side of the regedit window.
Please help
The solution is:
REG ADD “HKCU\Software\Microsoft\Windows\CurrentVersion\Group Policy Objects\{A711A0A8-6020-4FB1-A477-4E550E2FBE76}Machine\Software\Policies\Microsoft\Windows\DeviceInstall\Restrictions” /v AllowAdminInstall /t REG_DWORD /d 1
Thanks for reading 🙂