1、Helpdesk桌面运维自动化配置工具Helpdesk_Automatic_configuration_Tool软件界面如下图:以下至文档末尾是全部代码:#cs -AutoIt Version: 3.3.14.2Author: Miguel LouisScript Function: Helpdesk_Automatic_configuration_Tool 关于Helpdesk_Automatic_configuration_ToolHelpdesk_Automatic_configuration_Tool是一款Helpdesk桌面运维自动化配置的工具,由类BASIC语言的AutoIt v3
2、 脚本编写,用于简化Helpdesk大量繁复的操作,通过GUI交互,实现以下功能,大幅解放Helpdesk桌面工程师的时间和精力,用于更高的技术学习和提升。1. 自动设置系统选项2. 客户端自动加域3. 自动安装软件4. 自动重启电脑并登录域账户5. 自动配置桌面环境6. 自动配置outlook及skype等配置说明:以下代码位于134 144行,user-defined部分请根据实际需求和场景自定义Global $rootUserName = administrator ;本地管理员administratorGlobal $rootPassword = user-defined ;本地管理员
3、密码Global $createUserName = admin ;创建本地用户名Global $createUserPassword = user-defined ;设置本地用户名密码Global $domainName = user-defined ;AD域名,Global $itUserName = user-defined ;IT管理员域账户Global $itPassword = user-defined ;IT管理员域账户密码Global $fileSrvPath = user-defined ;安装文件所在的共享目录地址Global $userName ;用户域账号Global
4、$userPassword ;用户域账户密码Global $hostName ;用户计算机名使用说明:1. 该自动化运维工具适用于Microsoft Windows 7、Windows 8、Windows 10系统,结合企业级系统部署平台MDT使用更优2. 配置选项用于根据不同部门员工的桌面使用需求自动进行系统设置、安装软件等初始化操作,需在administraor账户下运行3. 用户选项用于根据不用部门员工的桌面使用需求自动进行桌面环境配置,outlook、skype等办公软件登录设置,需在用于账户下运行4. 自动重启系统+登录账户 通过授予用户本地管理员权限并修改注册表实现,在系统重启自动
5、登录用户账户后,需运行取消自动登录 和 取消管理员权限来重置注册表并从administrators组移出用户账户5. 可根据各自公司内部的实际桌面运维需求,修改该脚本代码,从而添加、修改或删除自动化功能模块6. 所需安装的软件和工具下载放置于$fileSrvPath下,并根据存放路径和软件名称修改对应模块的代码#ce -; Script Start - Add your code below here;请求管理员权限#RequireAdmin;#include ;#include ;#include #include #include ; 切换为 OnEvent 模式Opt(GUIOnEven
6、tMode, 1)_main()GUISetState()Func _main() Global $Checkbox53 Global $gui_width = 490 Global $gui_height = 500 Global $checkbox_left = 5 Global $sysconf_top = 10 Global $install_top = 155 Global $user_top = 375 Global $checkbox_width = 150 Global $checkbox_height = 20 Global $select_left = 5 Global $
7、select_top = 300 Global $select_width = 50 Global $select_height = 30 GUICreate(自动化配置工具 V1.0 - By Miguel Louis, $gui_width, $gui_height) GUICtrlCreateGroup(系统设置, $checkbox_left, $sysconf_top, $gui_width-10, $gui_height/3-30) $Checkbox1 = GUICtrlCreateCheckbox(修改计算机名并加域, $checkbox_left+5, $sysconf_to
8、p+20, $checkbox_width, $checkbox_height) $Checkbox2 = GUICtrlCreateCheckbox(修改管理员密码, $checkbox_left+160, $sysconf_top+20, $checkbox_width, $checkbox_height) $Checkbox3 = GUICtrlCreateCheckbox(创建本地用户admin, $checkbox_left+320, $sysconf_top+20, $checkbox_width, $checkbox_height) $Checkbox4 = GUICtrlCre
9、ateCheckbox(添加IT管理员组, $checkbox_left+5, $sysconf_top+50, $checkbox_width, $checkbox_height) $Checkbox5 = GUICtrlCreateCheckbox(开启远程桌面, $checkbox_left+160, $sysconf_top+50, $checkbox_width, $checkbox_height) $Checkbox6 = GUICtrlCreateCheckbox(安装AD证书, $checkbox_left+320, $sysconf_top+50, $checkbox_wid
10、th, $checkbox_height) $Checkbox7 = GUICtrlCreateCheckbox(激活Office, $checkbox_left+5, $sysconf_top+80, $checkbox_width, $checkbox_height) $Checkbox8 = GUICtrlCreateCheckbox(降低UAC等级, $checkbox_left+160, $sysconf_top+80, $checkbox_width, $checkbox_height) GUICtrlCreateGroup(软件安装, $checkbox_left, $insta
11、ll_top, $gui_width-10, $gui_height/3-30) $Checkbox21 = GUICtrlCreateCheckbox(Adobe Flash Player, $checkbox_left+5, $install_top+20, $checkbox_width, $checkbox_height) $Checkbox22 = GUICtrlCreateCheckbox(Google Chrome, $checkbox_left+160, $install_top+20, $checkbox_width, $checkbox_height) $Checkbox2
12、3 = GUICtrlCreateCheckbox(LinPhone for Windows, $checkbox_left+320, $install_top+20, $checkbox_width, $checkbox_height) $Checkbox24 = GUICtrlCreateCheckbox(Cisco VPN Client, $checkbox_left+5, $install_top+50, $checkbox_width, $checkbox_height) $Checkbox25 = GUICtrlCreateCheckbox(Minerva Pro, $checkb
13、ox_left+160, $install_top+50, $checkbox_width, $checkbox_height) $Checkbox26 = GUICtrlCreateCheckbox(Avaya one-X, $checkbox_left+320, $install_top+50, $checkbox_width, $checkbox_height) $Checkbox27 = GUICtrlCreateCheckbox(Teamviewer11to10, $checkbox_left+5, $install_top+80, $checkbox_width, $checkbo
14、x_height) $Checkbox28 = GUICtrlCreateCheckbox(Teamviewer10, $checkbox_left+160, $install_top+80, $checkbox_width, $checkbox_height) GUICtrlCreateGroup(配置选项,$select_left, $select_top, $gui_width-10, $gui_height/3-100) Global $Radio1 = GUICtrlCreateRadio(销售, $select_left+5, $select_top+20, $select_wid
15、th, $select_height) Global $Radio2 = GUICtrlCreateRadio(销售(含VPN), $select_left+55, $select_top+20, $select_width+40, $select_height) Global $Radio3 = GUICtrlCreateRadio(运营, $select_left+150, $select_top+20, $select_width, $select_height) Global $Radio4 = GUICtrlCreateRadio(售后, $select_left+200, $sel
16、ect_top+20, $select_width, $select_height) GUICtrlCreateGroup(用户选项,$select_left, $user_top, $gui_width-10, $gui_height/3-100) $Checkbox43 = GUICtrlCreateCheckbox(销售, $checkbox_left+5, $user_top+20, $checkbox_width-100, $checkbox_height+10) $Checkbox44 = GUICtrlCreateCheckbox(运营, $checkbox_left+65, $
17、user_top+20, $checkbox_width-100, $checkbox_height+10) $Checkbox45 = GUICtrlCreateCheckbox(售后, $checkbox_left+135, $user_top+20, $checkbox_width-100, $checkbox_height+10) $Checkbox41 = GUICtrlCreateCheckbox(取消自动登录, $checkbox_left+205, $user_top+20, $checkbox_width-50, $checkbox_height+10) $Checkbox4
18、2 = GUICtrlCreateCheckbox(取消管理员权限, $checkbox_left+305, $user_top+20, $checkbox_width-50, $checkbox_height+10) $Checkbox51 = GUICtrlCreateCheckbox(自动重启系统+登录账户, $select_left+90, $user_top+85, $select_width+100, $select_height) Global $Radio11 = GUICtrlCreateRadio(全选, $select_left+260, $user_top+85, $s
19、elect_width, $select_height) Global $Radio12 = GUICtrlCreateRadio(全不选, $select_left+320, $user_top+85, $select_width+10, $select_height) Global $Button1 = GUICtrlCreateButton(运行 (&A), $select_left, $user_top+80, $select_width+20, $select_height) Global $Button2 = GUICtrlCreateButton(退出 (&E), $select
20、_left+410, $user_top+80, $select_width+20, $select_height) GUICtrlSetOnEvent($Radio1,_chooseStation) GUICtrlSetOnEvent($Radio2,_chooseStationWithVPN) GUICtrlSetOnEvent($Radio3,_chooseCreditAduit) GUICtrlSetOnEvent($Radio4,_chooseCollection) GUICtrlSetOnEvent($Radio11,_chooseAll) GUICtrlSetOnEvent($R
21、adio12,_chooseNone) GUICtrlSetOnEvent($Checkbox43,_userStation) GUICtrlSetOnEvent($Checkbox44,_userCreditAduit) GUICtrlSetOnEvent($Checkbox45,_userCollection) GUICtrlSetOnEvent($Button1,_action) GUICtrlSetOnEvent($Button2,_exit) GUISetOnEvent($GUI_EVENT_CLOSE,_exit) Global $_run53 $_run1 = _run1 ;修改
22、计算机名并加域 $_run2 = _run2 ;修改管理员密码 $_run3 = _run3 ;创建Admin用户 $_run4 = _run4 ;添加IT服务台 $_run5 = _run5 ;开启远程桌面 $_run6 = _run6 ;安装AD证书 $_run7 = _run7 ;激活Office $_run8 = _run8 ;降低UAC等级 $_run21 = _run21 ;安装Adobe Flash Player $_run22 = _run22 ;安装Google Chrome $_run23 = _run23 ;安装LinPhone for Windows $_run24 =
23、 _run24 ;安装Cisco VPN Client $_run25 = _run25 ;安装Minerva Pro $_run26 = _run26 ;安装Avaya one-X $_run27 = _run27 ;卸载TeamViewer11,安装TeamViewer10 $_run28 = _run28 ;安装TeamViewer10 $_run41 = _run41 ;取消自动登录 $_run42 = _run42 ;取消管理员权限 $_run43 = _run43 ;销售用户配置 $_run44 = _run44 ;运营用户配置 $_run45 = _run45 ;售后用户配置 $
24、_run51 = _run51 ;自动重启系统 Global $rootUserName = administrator ;本地管理员administrator Global $rootPassword = user-defined ;本地管理员密码 Global $createUserName = admin ;创建本地用户名 Global $createUserPassword = user-defined ;设置本地用户名密码 Global $domainName = user-defined ;AD域名, Global $itUserName = user-defined ;IT管理员
25、域账户 Global $itPassword = user-defined ;IT管理员域账户密码 Global $fileSrvPath = user-defined ;安装文件所在的共享目录地址 Global $userName ;用户域账号 Global $userPassword ;用户域账户密码 Global $hostName ;用户计算机名EndFuncWhile 1 sleep(1000)WEnd;关闭程序Func _exit() ExitEndFunc;销售Func _chooseStation() For $i = 1 to 52 GUICtrlSetState($Chec
26、kbox$i,4) Next GUICtrlSetState($Checkbox1,1) GUICtrlSetState($Checkbox2,1) GUICtrlSetState($Checkbox3,1) GUICtrlSetState($Checkbox4,1) GUICtrlSetState($Checkbox5,1) GUICtrlSetState($Checkbox6,1) GUICtrlSetState($Checkbox7,1) GUICtrlSetState($Checkbox21,1) GUICtrlSetState($Checkbox51,1) GUICtrlSetSta
27、te($Radio11,4) GUICtrlSetState($Radio12,4)EndFunc;销售(含VPN)Func _chooseStationWithVPN() For $i = 1 to 52 GUICtrlSetState($Checkbox$i,4) Next GUICtrlSetState($Checkbox1,1) GUICtrlSetState($Checkbox2,1) GUICtrlSetState($Checkbox3,1) GUICtrlSetState($Checkbox4,1) GUICtrlSetState($Checkbox5,1) GUICtrlSet
28、State($Checkbox6,1) GUICtrlSetState($Checkbox7,1) GUICtrlSetState($Checkbox21,1) GUICtrlSetState($Checkbox24,1) GUICtrlSetState($Checkbox51,1) GUICtrlSetState($Radio11,4) GUICtrlSetState($Radio12,4)EndFunc;运营Func _chooseCreditAduit() For $i = 1 to 52 GUICtrlSetState($Checkbox$i,4) Next GUICtrlSetSta
29、te($Checkbox1,1) GUICtrlSetState($Checkbox2,1) GUICtrlSetState($Checkbox4,1) GUICtrlSetState($Checkbox5,1) GUICtrlSetState($Checkbox6,1) GUICtrlSetState($Checkbox7,1) GUICtrlSetState($Checkbox21,1) GUICtrlSetState($Checkbox23,1) GUICtrlSetState($Checkbox51,1) GUICtrlSetState($Radio11,4) GUICtrlSetSt
30、ate($Radio12,4)EndFunc;售后Func _chooseCollection() For $i = 1 to 52 GUICtrlSetState($Checkbox$i,4) Next GUICtrlSetState($Checkbox1,1) GUICtrlSetState($Checkbox2,1) GUICtrlSetState($Checkbox4,1) GUICtrlSetState($Checkbox5,1) GUICtrlSetState($Checkbox6,1) GUICtrlSetState($Checkbox7,1) GUICtrlSetState($Checkbox
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1