Recently, in the implementation of the CRM system, where the CPQ component requires that the site must be joined to the "Local intranet" to be able to use, but because the use of more users (more than thousands of people), and each user's computer level is different, so let the user manually to do this setup is more troublesome, One is a waste of everyone's time, the second is that the process is not smooth will result in a larger service workload, so I used AutoHotkey write an executable file to set up, mainly to complete the following work:
Add two IP addresses to the hosts file to prevent internal DNS server parsing errors
Add IP and domain names to the intranet and delete them before adding them, so you won't get an error when you run the second time.
The specific code is as follows:
; This script is created using Pulover ' s Macro Creator; Www.macrocreator.com#NoEnvSetWorkingDir%a_scriptdir%coordmode, Mouse, Windowsendmode input#singleinstance Forcesettitlematchmode 2#winactivateforcesetcontroldelay 1SetWinDelay 0setkeydelay-1setmousedelay-1setbatchlines- 1macro2:fileappend, ' R ' n10.110.9.205 crmprd1.inspur.com, C:\WINDOWS\system32\drivers\etc\hosts fileappend, ' R ' n10.110.9.206 crmcpq1.inspur.com, C:\WINDOWS\system32\drivers\etc\hostsRegDelete, HKEY_CURRENT_USER, software\ Microsoft\windows\currentversion\internet Settings\zonemap\ranges\range250regwrite, REG_SZ, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Internet Settings\zonemap\ranges\, Range250regwrite, REG_DWORD, HKEY_ Current_User, Software\Microsoft\Windows\CurrentVersion\Internet settings\zonemap\ranges\range250, *, 1RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Internet settings\zonemap\ranges\range250,: Range, 10.110.9.206RegDelete, HKEY_CURRENT_USER, SofTware\microsoft\windows\currentversion\internet Settings\zonemap\domains\inspur.com\crmcpq1regwrite, REG_SZ, HKEY _current_user, Software\Microsoft\Windows\CurrentVersion\Internet settings\zonemap\domains\inspur.com, Crmcpq1regwrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap \DOMAINS\INSPUR.COM\CRMCPQ1, *, 1MsgBox, 0, Inspur CRM, all Settings have been done. Return
PS: Two-point feeling,
1. AutoHotkey still a bit small, the writing process encountered problems in Google search is significantly inferior to other scripting languages, and the blog Park Insert Code does not support AutoHotkey.
2. Do not contact with the most common computer users, you will not really understand the 360 browser occupancy rate is high, the recent in-beta contact sales, almost everyone has installed 360 browser, too cow.
AutoHotkey implementing an intranet local site that adds a site to IE