Here's a way to simplify the process.
- Create a .exe to ask for the domain (a textbox), specify the
providers (as checkboxes: All, http, https, ftp) click "Add Site to
Trusted Sites" to then do the following:
- Create a temp folder on C: as "C:\TempTS\"
- Create a .bat file ("C:\TempTS\AddTrustedSites.bat") similar to this:
set regFile="C:\TempTS\AddTrustedSiteTS.reg"
ECHO Windows Registry Editor Version 5.00 > %regFile%
ECHO [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet
Settings\ZoneMap\Domains\MySecureDomain.com\www] >> %regFile
ECHO "https"=dword:00000002 >> %regFile%
regedit /s %regFile%
DEL %regFile%
The ECHO [HKEY_CURRENT_USER... and ECHO "https"... lines can be repeated for each provider checked. For the "ALL" provider, use an asterisk in place of "https", like such:
ECHO [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet
Settings\ZoneMap\Domains\MySecureDomain.com\www] >> %regFile%
ECHO "*"=dword:00000002 >> %regFile%
Run the .bat file using this call:
System.Diagnostics.Process.Start("C:\TempTS\AddTrustedSites.bat")
After the .bat file is ran (takes mere microseconds), delete both the bat file and tempTS directory.
MacSpudster
(a.k.a. GNoter, TechStuffBC)
=========================
Credit where credit is due:
regedit /s AddTrustedSite.reg
the "/s" will supress confirm dialog boxes
http://www.computerhope.com/registry.html
also:
see http://www.computing.net/answers/windows-xp/bat-file-to-add-trusted-site-in-ie/139995.html