windows通过脚本文件添加站点的方法
我们公司新上线了一个OA系统,需要设置信任站点以及Active加载项才可以正常浏览访问。如果在没有域环境或者有很多分公司,那么通过脚本的方法,让客户端下载后,双击运行便可以设置成功。这样的方式将大大提高用户的体验满意度和我们的工作效率。将文本复制后保存,设置为。bat文件,修改相应所需的网站名称即可。嘿嘿,很简单吧!
脚本如下:
@echo off
reg delete "HKCUSoftwareMicrosoftWindowsCurrentVersionInternet SettingsZoneMapDomainsgzb.com" /va /f
reg add "HKCUSoftwareMicrosoftWindowsCurrentVersionInternet SettingsZoneMapDomainsgzb.com"
reg add "HKCUSoftwareMicrosoftWindowsCurrentVersionInternet SettingsZoneMapDomainsgzb.com" /v "*" /t REG_DWORD /d 2
reg delete "HKCUSoftwareMicrosoftWindowsCurrentVersionInternet SettingsZoneMapRangesRange101" /a /f
reg add "HKCUSoftwareMicrosoftWindowsCurrentVersionInternet SettingsZoneMapRangesRange101"
reg add "HKCUSoftwareMicrosoftWindowsCurrentVersionInternet SettingsZoneMapRangesRange101" /a "*"
reg add "HKCUSoftwareMicrosoftWindowsCurrentVersionInternet SettingsZoneMapRangesRange101" /a ":Range" /t REG_SZ /d "192.168.1.238"
------
reg delete "HKCUSoftwareMicrosoftWindowsCurrentVersionInternet SettingsZoneMapEscDomainsportal.palm-la.com" /va /f
reg add "HKCUSoftwareMicrosoftWindowsCurrentVersionInternet SettingsZoneMapEscDomainsportal.palm-la.com"
reg add "HKCUSoftwareMicrosoftWindowsCurrentVersionInternet SettingsZoneMapEscDomainsportal.palm-la.com"
reg delete "HKCUSoftwareMicrosoftWindowsCurrentVersionInternet SettingsZoneMapEscRangesRange101" /a /f
reg add "HKCUSoftwareMicrosoftWindowsCurrentVersionInternet SettingsZoneMapEscRangesRange101"
reg add "HKCUSoftwareMicrosoftWindowsCurrentVersionInternet SettingsZoneMapEscRangesRange101" /v "*" REG_DWORD /d 2
reg add "HKCUSoftwareMicrosoftWindowsCurrentVersionInternet SettingsZoneMapEscRangesRange101" /v ":Range" /t REG_SZ /d "192.168.1.238"
reg add "HKEY_USERS.DEFAULTSoftwareMicrosoftInternet ExplorerMain" "Start Page" /d "http://gzb.com/" /f >NUL
reg add "HKEY_CURRENT_USERSoftwareMicrosoftInternet ExplorerMain" "Start Page" /d "http://gzb.com/" /f >NUL
reg add "HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionWinlogon" /v "DisableCAD" /t REG_DWORD /d >NUL
reg add "HKCUSoftwareMicrosoftWindowsCurrentVersionInternet SettingsZones2" /v "1004" /t REG_DWORD /d 0 /f
reg add "HKCUSoftwareMicrosoftWindowsCurrentVersionInternet SettingsZones2" /v "1201" /t REG_DWORD /d 0 /f
reg add "HKCUSoftwareMicrosoftWindowsCurrentVersionInternet SettingsZones2" /v "1402" /t REG_DWORD /d 0 /f
reg add "HKCUSoftwareMicrosoftWindowsCurrentVersionInternet SettingsZones2" /v "2201" /t REG_DWORD /d 0 /f
reg add "HKCUSoftwareMicrosoftWindowsCurrentVersionInternet SettingsZones2" /v "1001" /t REG_DWORD /d 0 /f
reg add "HKCUSoftwareMicrosoftWindowsCurrentVersionInternet SettingsZones2" /v "1405" /t REG_DWORD /d 0 /f
PAUSE
以上是windows通过脚本文件添加站点咯!