What I am trying to do is create a batch file that I can send to remote users that they can run to automatically change a few Internet Options for them.
I need to add a domain to the trusted sites list as https and I need to set the “Initialize and script ActiveX controls not marked as safe for scripting” to Enabled.
I can set the ActiveX with this line of code with no problems…
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2" /v "1201" /t REG_DWORD /d 0 /f
However when I try to add a new domain as https I get an Error: Invalid Key Name
What I am running is 2 lines of code…
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\msn.com"
reg add [[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\msn.com\]"https"=dword:00000002]
The first line adds the domain but the second line should add the https value and that is where I am getting my error.
I am sure this is a simple syntax error. Can anyone help me with this? I would really appreciate it!! Thanks in advance!