惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Google DeepMind News
Google DeepMind News
Stack Overflow Blog
Stack Overflow Blog
Hugging Face - Blog
Hugging Face - Blog
博客园_首页
T
The Blog of Author Tim Ferriss
博客园 - 叶小钗
N
Netflix TechBlog - Medium
腾讯CDC
C
Check Point Blog
P
Proofpoint News Feed
Engineering at Meta
Engineering at Meta
GbyAI
GbyAI
S
SegmentFault 最新的问题
F
Fortinet All Blogs
美团技术团队
U
Unit 42
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园 - 司徒正美
F
Full Disclosure
Recorded Future
Recorded Future
D
DataBreaches.Net
博客园 - 【当耐特】
Martin Fowler
Martin Fowler
J
Java Code Geeks
I
InfoQ
Y
Y Combinator Blog
A
About on SuperTechFans
AI
AI
爱范儿
爱范儿
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Forbes - Security
Forbes - Security
W
WeLiveSecurity
M
MIT News - Artificial intelligence
雷峰网
雷峰网
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Simon Willison's Weblog
Simon Willison's Weblog
Schneier on Security
Schneier on Security
The GitHub Blog
The GitHub Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
aimingoo的专栏
aimingoo的专栏
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
G
GRAHAM CLULEY
Know Your Adversary
Know Your Adversary
Latest news
Latest news
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
D
Docker
Recent Commits to openclaw:main
Recent Commits to openclaw:main
量子位
V2EX - 技术
V2EX - 技术
Project Zero
Project Zero

博客园 - 张荣华

摩托车买车学车流水账 我的2016年 如何通过***自动更新Chrome - 张荣华 如何在Excel中通过VBA快速查找多列重复的值 写给大家看的设计书 VSS每次打开都需要服务器账号和密码的解决方法 好的工作习惯 某CRM项目招投标工作的感悟 读书笔记---PMBOK第五版官方中文版 善用佳软,打造高效率的办公环境 怎么在Microsoft Project中冻结列 我的家庭保险方案推荐 如何修改Total Commander配件文件的位置 豆瓣统计-2015 读书笔记---《火球:UML大战需求分析》 博客编写客户端分享 IT人员如何保护视力 SublimeText3下的Python开发环境配置 从Evernote迁移到Wiz 读书笔记---《即学即用财务常识120例》
AutoHotKey实现将站点添加到IE的Intranet本地站点
张荣华 · 2016-09-26 · via 博客园 - 张荣华

最近在内部推行CRM系统,其中的CPQ组件要求必须将站点加入到"本地Intranet”才可以正常使用,但是由于使用用户比较多(超过几千人),并且每个用户的计算机水平都不一样,所以让用户手工去进行这种设置变比较麻烦,一个是浪费了大家的时间,二是过程不顺利会导致服务工作量比较大,所以我就用AutoHotKey写了一个可执行文件来进行设置,主要完成以下工作:

添加添加两个IP地址到Hosts文件,防止内部DNS服务器解析错误
添加IP和域名到Intranet,添加之前先删除,这样第二次运行的时候也不会报错。
具体的代码如下:

; This script was created using Pulover's Macro Creator
; www.macrocreator.com

#NoEnv
SetWorkingDir %A_ScriptDir%
CoordMode, Mouse, Window
SendMode Input
#SingleInstance Force
SetTitleMatchMode 2
#WinActivateForce
SetControlDelay 1
SetWinDelay 0
SetKeyDelay -1
SetMouseDelay -1
SetBatchLines -1


Macro2:
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\hosts
RegDelete, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range250
RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\, Range250
RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range250, *, 1
RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range250, :Range, 10.110.9.206
RegDelete, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\inspur.com\crmcpq1
RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\inspur.com, crmcpq1
RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\inspur.com\crmcpq1, *, 1
MsgBox, 0, Inspur CRM, All Settings has been done. 
Return

  PS:两点感触,

1. AutoHotKey还是有点小众,写作过程中遇到问题在google上搜索明显不如其他脚本语言, 并且博客园的插入代码也不支持AutoHotKey。

2. 不与最普通的电脑用户接触,你就不会真正明白360浏览器的占用率有多高,最近内测中接触的销售,几乎每人个都安装了360浏览器,太牛了。