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…
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!
Internet / Email SoftwareMicrosoft DOSWindows XPEmail Software
Last Comment
johnb6767
8/22/2022 - Mon
jakethecatuk
if you have cut and pasted your script straight into the post, then I can see the problem straight away.
before HTTPS, you have got the bracket the wrong way round.
]"https"=dword:00000002]
should be
["https"=dword:00000002]
CCG3
ASKER
Thanks for the reply Jake but I tried that and got the same error. I have tired it with the brackets without the brackets everything that I can think of.
before HTTPS, you have got the bracket the wrong way round.
]"https"=dword:00000002]
should be
["https"=dword:00000002]