Helpdesk桌面運(yùn)維自動(dòng)化配置工具_(dá)第1頁
Helpdesk桌面運(yùn)維自動(dòng)化配置工具_(dá)第2頁
Helpdesk桌面運(yùn)維自動(dòng)化配置工具_(dá)第3頁
Helpdesk桌面運(yùn)維自動(dòng)化配置工具_(dá)第4頁
Helpdesk桌面運(yùn)維自動(dòng)化配置工具_(dá)第5頁
已閱讀5頁,還剩35頁未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

1、精選優(yōu)質(zhì)文檔-傾情為你奉上精選優(yōu)質(zhì)文檔-傾情為你奉上專心-專注-專業(yè)專心-專注-專業(yè)精選優(yōu)質(zhì)文檔-傾情為你奉上專心-專注-專業(yè)Helpdesk_Automatic_configuration_Tool軟件界面如下圖:以下至文檔末尾是全部代碼:#cs -AutoIt Version: 3.3.14.2Author: Miguel LouisScript Function: Helpdesk_Automatic_configuration_Tool 關(guān)于Helpdesk_Automatic_configuration_ToolHelpdesk_Automatic_configuration_Too

2、l是一款Helpdesk桌面運(yùn)維自動(dòng)化配置的工具,由類BASIC語言的AutoIt v3 腳本編寫,用于簡(jiǎn)化Helpdesk大量繁復(fù)的操作,通過GUI交互,實(shí)現(xiàn)以下功能,大幅解放Helpdesk桌面工程師的時(shí)間和精力,用于更高的技術(shù)學(xué)習(xí)和提升。1. 自動(dòng)設(shè)置系統(tǒng)選項(xiàng)2. 客戶端自動(dòng)加域3. 自動(dòng)安裝軟件4. 自動(dòng)重啟電腦并登錄域賬戶5. 自動(dòng)配置桌面環(huán)境6. 自動(dòng)配置outlook及skype等配置說明:以下代碼位于134 144行,user-defined部分請(qǐng)根據(jù)實(shí)際需求和場(chǎng)景自定義Global $rootUserName = administrator ;本地管理員administrat

3、orGlobal $rootPassword = user-defined ;本地管理員密碼Global $createUserName = admin ;創(chuàng)建本地用戶名Global $createUserPassword = user-defined ;設(shè)置本地用戶名密碼Global $domainName = user-defined ;AD域名,Global $itUserName = user-defined ;IT管理員域賬戶Global $itPassword = user-defined ;IT管理員域賬戶密碼Global $fileSrvPath = user-defined

4、;安裝文件所在的共享目錄地址Global $userName ;用戶域賬號(hào)Global $userPassword ;用戶域賬戶密碼Global $hostName ;用戶計(jì)算機(jī)名使用說明:1. 該自動(dòng)化運(yùn)維工具適用于Microsoft Windows 7、Windows 8、Windows 10系統(tǒng),結(jié)合企業(yè)級(jí)系統(tǒng)部署平臺(tái)MDT使用更優(yōu)2. 配置選項(xiàng)用于根據(jù)不同部門員工的桌面使用需求自動(dòng)進(jìn)行系統(tǒng)設(shè)置、安裝軟件等初始化操作,需在administraor賬戶下運(yùn)行3. 用戶選項(xiàng)用于根據(jù)不用部門員工的桌面使用需求自動(dòng)進(jìn)行桌面環(huán)境配置,outlook、skype等辦公軟件登錄設(shè)置,需在用于賬戶下運(yùn)行

5、4. 自動(dòng)重啟系統(tǒng)+登錄賬戶 通過授予用戶本地管理員權(quán)限并修改注冊(cè)表實(shí)現(xiàn),在系統(tǒng)重啟自動(dòng)登錄用戶賬戶后,需運(yùn)行取消自動(dòng)登錄 和 取消管理員權(quán)限來重置注冊(cè)表并從administrators組移出用戶賬戶5. 可根據(jù)各自公司內(nèi)部的實(shí)際桌面運(yùn)維需求,修改該腳本代碼,從而添加、修改或刪除自動(dòng)化功能模塊6. 所需安裝的軟件和工具下載放置于$fileSrvPath下,并根據(jù)存放路徑和軟件名稱修改對(duì)應(yīng)模塊的代碼#ce -; Script Start - Add your code below here;請(qǐng)求管理員權(quán)限#RequireAdmin;#include ;#include ;#include #in

6、clude #include ; 切換為 OnEvent 模式Opt(GUIOnEventMode, 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_

7、height = 20 Global $select_left = 5 Global $select_top = 300 Global $select_width = 50 Global $select_height = 30 GUICreate(自動(dòng)化配置工具 V1.0 - By Miguel Louis, $gui_width, $gui_height) GUICtrlCreateGroup(系統(tǒng)設(shè)置, $checkbox_left, $sysconf_top, $gui_width-10, $gui_height/3-30) $Checkbox1 = GUICtrlCreateCheck

8、box(修改計(jì)算機(jī)名并加域, $checkbox_left+5, $sysconf_top+20, $checkbox_width, $checkbox_height) $Checkbox2 = GUICtrlCreateCheckbox(修改管理員密碼, $checkbox_left+160, $sysconf_top+20, $checkbox_width, $checkbox_height) $Checkbox3 = GUICtrlCreateCheckbox(創(chuàng)建本地用戶admin, $checkbox_left+320, $sysconf_top+20, $checkbox_widt

9、h, $checkbox_height) $Checkbox4 = GUICtrlCreateCheckbox(添加IT管理員組, $checkbox_left+5, $sysconf_top+50, $checkbox_width, $checkbox_height) $Checkbox5 = GUICtrlCreateCheckbox(開啟遠(yuǎn)程桌面, $checkbox_left+160, $sysconf_top+50, $checkbox_width, $checkbox_height) $Checkbox6 = GUICtrlCreateCheckbox(安裝AD證書, $check

10、box_left+320, $sysconf_top+50, $checkbox_width, $checkbox_height) $Checkbox7 = GUICtrlCreateCheckbox(激活Office, $checkbox_left+5, $sysconf_top+80, $checkbox_width, $checkbox_height) $Checkbox8 = GUICtrlCreateCheckbox(降低UAC等級(jí), $checkbox_left+160, $sysconf_top+80, $checkbox_width, $checkbox_height) GUI

11、CtrlCreateGroup(軟件安裝, $checkbox_left, $install_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, $

12、checkbox_width, $checkbox_height) $Checkbox23 = 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

13、= GUICtrlCreateCheckbox(Minerva Pro, $checkbox_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

14、, $install_top+80, $checkbox_width, $checkbox_height) $Checkbox28 = GUICtrlCreateCheckbox(Teamviewer10, $checkbox_left+160, $install_top+80, $checkbox_width, $checkbox_height) GUICtrlCreateGroup(配置選項(xiàng),$select_left, $select_top, $gui_width-10, $gui_height/3-100) Global $Radio1 = GUICtrlCreateRadio(銷售,

15、 $select_left+5, $select_top+20, $select_width, $select_height) Global $Radio2 = GUICtrlCreateRadio(銷售(含VPN), $select_left+55, $select_top+20, $select_width+40, $select_height) Global $Radio3 = GUICtrlCreateRadio(運(yùn)營(yíng), $select_left+150, $select_top+20, $select_width, $select_height) Global $Radio4 = G

16、UICtrlCreateRadio(售后, $select_left+200, $select_top+20, $select_width, $select_height) GUICtrlCreateGroup(用戶選項(xiàng),$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 = GU

17、ICtrlCreateCheckbox(運(yùn)營(yíng), $checkbox_left+65, $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(取消自動(dòng)登錄, $checkbox_left+205, $user_top+20, $checkb

18、ox_width-50, $checkbox_height+10) $Checkbox42 = GUICtrlCreateCheckbox(取消管理員權(quán)限, $checkbox_left+305, $user_top+20, $checkbox_width-50, $checkbox_height+10) $Checkbox51 = GUICtrlCreateCheckbox(自動(dòng)重啟系統(tǒng)+登錄賬戶, $select_left+90, $user_top+85, $select_width+100, $select_height) Global $Radio11 = GUICtrlCreate

19、Radio(全選, $select_left+260, $user_top+85, $select_width, $select_height) Global $Radio12 = GUICtrlCreateRadio(全不選, $select_left+320, $user_top+85, $select_width+10, $select_height) Global $Button1 = GUICtrlCreateButton(運(yùn)行 (&A), $select_left, $user_top+80, $select_width+20, $select_height) Global $Bu

20、tton2 = GUICtrlCreateButton(退出 (&E), $select_left+410, $user_top+80, $select_width+20, $select_height) GUICtrlSetOnEvent($Radio1,_chooseStation) GUICtrlSetOnEvent($Radio2,_chooseStationWithVPN) GUICtrlSetOnEvent($Radio3,_chooseCreditAduit) GUICtrlSetOnEvent($Radio4,_chooseCollection) GUICtrlSetOnEve

21、nt($Radio11,_chooseAll) GUICtrlSetOnEvent($Radio12,_chooseNone) GUICtrlSetOnEvent($Checkbox43,_userStation) GUICtrlSetOnEvent($Checkbox44,_userCreditAduit) GUICtrlSetOnEvent($Checkbox45,_userCollection) GUICtrlSetOnEvent($Button1,_action) GUICtrlSetOnEvent($Button2,_exit) GUISetOnEvent($GUI_EVENT_CL

22、OSE,_exit) Global $_run53 $_run1 = _run1 ;修改計(jì)算機(jī)名并加域 $_run2 = _run2;修改管理員密碼 $_run3 = _run3 ;創(chuàng)建Admin用戶 $_run4 = _run4;添加IT服務(wù)臺(tái) $_run5 = _run5 ;開啟遠(yuǎn)程桌面 $_run6 = _run6 ;安裝AD證書 $_run7 = _run7;激活Office $_run8 = _run8;降低UAC等級(jí) $_run21 = _run21 ;安裝Adobe Flash Player $_run22 = _run22 ;安裝Google Chrome $_run23 =

23、_run23 ;安裝LinPhone for Windows $_run24 = _run24 ;安裝Cisco VPN Client $_run25 = _run25 ;安裝Minerva Pro $_run26 = _run26 ;安裝Avaya one-X $_run27 = _run27 ;卸載TeamViewer11,安裝TeamViewer10 $_run28 = _run28 ;安裝TeamViewer10 $_run41 = _run41 ;取消自動(dòng)登錄 $_run42 = _run42 ;取消管理員權(quán)限 $_run43 = _run43 ;銷售用戶配置 $_run44 = _

24、run44 ;運(yùn)營(yíng)用戶配置 $_run45 = _run45 ;售后用戶配置 $_run51 = _run51 ;自動(dòng)重啟系統(tǒng) Global $rootUserName = administrator ;本地管理員administrator Global $rootPassword = user-defined ;本地管理員密碼 Global $createUserName = admin ;創(chuàng)建本地用戶名 Global $createUserPassword = user-defined ;設(shè)置本地用戶名密碼 Global $domainName = user-defined ;AD域名,

25、Global $itUserName = user-defined ;IT管理員域賬戶 Global $itPassword = user-defined ;IT管理員域賬戶密碼 Global $fileSrvPath = user-defined ;安裝文件所在的共享目錄地址 Global $userName;用戶域賬號(hào) Global $userPassword ;用戶域賬戶密碼 Global $hostName ;用戶計(jì)算機(jī)名EndFuncWhile 1 sleep(1000)WEnd;關(guān)閉程序Func _exit() ExitEndFunc;銷售Func _chooseStation()

26、 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) GUICtrlSetState($Checkbox6,1) GUICtrlSetState($Checkbox7,1) GUICtrlSetState($Checkbox21,1) GUICt

27、rlSetState($Checkbox51,1) GUICtrlSetState($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) G

28、UICtrlSetState($Checkbox5,1) GUICtrlSetState($Checkbox6,1) GUICtrlSetState($Checkbox7,1) GUICtrlSetState($Checkbox21,1) GUICtrlSetState($Checkbox24,1) GUICtrlSetState($Checkbox51,1) GUICtrlSetState($Radio11,4) GUICtrlSetState($Radio12,4)EndFunc;運(yùn)營(yíng)Func _chooseCreditAduit() For $i = 1 to 52 GUICtrlSet

29、State($Checkbox$i,4) Next GUICtrlSetState($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) G

30、UICtrlSetState($Radio11,4) GUICtrlSetState($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) GUICtrlS

31、etState($Checkbox7,1) GUICtrlSetState($Checkbox8,1) GUICtrlSetState($Checkbox21,1) GUICtrlSetState($Checkbox25,1) GUICtrlSetState($Checkbox26,1) GUICtrlSetState($Checkbox51,1) GUICtrlSetState($Radio11,4) GUICtrlSetState($Radio12,4)EndFunc;選中“銷售用戶配置”同時(shí)選中“安裝Google ChromeFunc _userStation() If _GUICtrl

32、Button_GetCheck($Checkbox43) Then GUICtrlSetState($Checkbox41,1) GUICtrlSetState($Checkbox42,1) EndIfEndFunc;選中“運(yùn)營(yíng)用戶配置”同時(shí)選中“安裝Google ChromeFunc _userCreditAduit() If _GUICtrlButton_GetCheck($Checkbox44) Then GUICtrlSetState($Checkbox22,1) GUICtrlSetState($Checkbox41,1) GUICtrlSetState($Checkbox42,1)

33、 EndIfEndFunc;選中“售后用戶配置”同時(shí)選中“安裝Google ChromeFunc _userCollection() If _GUICtrlButton_GetCheck($Checkbox45) Then GUICtrlSetState($Checkbox41,1) GUICtrlSetState($Checkbox42,1) EndIfEndFunc;全選Func _chooseAll() For $i = 1 to 40 GUICtrlSetState($Checkbox$i,1) Next For $i = 41 to 46 GUICtrlSetState($Check

34、box$i,4) Next GUICtrlSetState($Checkbox51,1) GUICtrlSetState($Radio1,4) GUICtrlSetState($Radio2,4) GUICtrlSetState($Radio3,4) GUICtrlSetState($Radio4,4) GUICtrlSetState($Radio12,4)EndFunc;全不選Func _chooseNone() For $i = 1 to 52 GUICtrlSetState($Checkbox$i,4) Next GUICtrlSetState($Radio1,4) GUICtrlSet

35、State($Radio2,4) GUICtrlSetState($Radio3,4) GUICtrlSetState($Radio4,4) GUICtrlSetState($Radio11,4)EndFunc;運(yùn)行Func _action() For $i = 1 to 52 If _GUICtrlButton_GetCheck($Checkbox$i) Then $_run$i() EndIf NextEndFunc;用戶配置Func _userConf() Run(C:Program FilesMicrosoft OfficeOffice16OUTLOOK.EXE) WinWaitAct

36、ive(歡迎使用 Microsoft Outlook 2016,歡迎使用 Outlook 2016) SLEEP(0 xF4) Send(!n) WinWaitActive(Microsoft Outlook 賬戶設(shè)置,使用 Outlook 連接到電子郵件帳戶) SLEEP(0 xF4) Send(!n) WinWaitActive(添加帳戶,電子郵件帳戶(&A) SLEEP(0 xE8) Send(!n) SLEEP(0 xD0) If WinExists(安全警告) Then ;如果提示未安裝域證書則自動(dòng)進(jìn)行安裝 If IsAdmin() Then WinMinimizeAll() Run

37、(explorer $fileSrvPathADCA.cer) WinWaitActive(證書,證書信息) SLEEP(0 xF4) Send(!i) WinWaitActive(證書導(dǎo)入向?qū)?歡迎使用證書導(dǎo)入向?qū)? SLEEP(0 xF4) Send(!n) WinWaitActive(證書導(dǎo)入向?qū)?證書存儲(chǔ)是保存證書的系統(tǒng)區(qū)域) SLEEP(0 xF4) Send(!p) SLEEP(0 xF4) Send(!r) WinWaitActive(選擇證書存儲(chǔ),選擇要使用的證書存儲(chǔ)) SLEEP(0 xF4) Send(DOWN) SLEEP(0 xF4) ControlClick(選擇證書

38、存儲(chǔ),選擇要使用的證書存儲(chǔ),Button1,left,1) WinWaitActive(證書導(dǎo)入向?qū)?證書存儲(chǔ)是保存證書的系統(tǒng)區(qū)域) SLEEP(0 xF4) Send(!n) WinWaitActive(證書導(dǎo)入向?qū)?正在完成證書導(dǎo)入向?qū)? SLEEP(0 xF4) ControlClick(證書導(dǎo)入向?qū)?正在完成證書導(dǎo)入向?qū)?Button6,left,1) Local $i = 0 While $i = 3000If WinExists(安全性警告) Then WinActivate(安全性警告,您即將從一個(gè)聲稱代表如下的證書頒發(fā)機(jī)構(gòu)安裝證書) WinWaitActive(安全性警告,您即

39、將從一個(gè)聲稱代表如下的證書頒發(fā)機(jī)構(gòu)安裝證書) SLEEP(0 xF4) Send(!y)Else SLEEP(0 xE8) $i = $i + 1000EndIf WEnd WinActivate(證書導(dǎo)入向?qū)?導(dǎo)入成功) WinWaitActive(證書導(dǎo)入向?qū)?導(dǎo)入成功) SLEEP(0 xF4) ControlClick(證書導(dǎo)入向?qū)?導(dǎo)入成功,Button1,left,1) WinWaitActive(證書,證書信息) SLEEP(0 xF4) Send(!i) WinWaitActive(證書導(dǎo)入向?qū)?歡迎使用證書導(dǎo)入向?qū)? SLEEP(0 xF4) Send(!n) WinWait

40、Active(證書導(dǎo)入向?qū)?證書存儲(chǔ)是保存證書的系統(tǒng)區(qū)域) SLEEP(0 xF4) Send(!p) SLEEP(0 xF4) Send(!r) WinWaitActive(選擇證書存儲(chǔ),選擇要使用的證書存儲(chǔ)) SLEEP(0 xF4) Send(DOWN) SLEEP(0 xF4) Send(DOWN) SLEEP(0 xF4) Send(DOWN) SLEEP(0 xF4) Send(DOWN) SLEEP(0 xF4) ControlClick(選擇證書存儲(chǔ),選擇要使用的證書存儲(chǔ),Button1,left,1) WinWaitActive(證書導(dǎo)入向?qū)?證書存儲(chǔ)是保存證書的系統(tǒng)區(qū)域)

41、SLEEP(0 xF4) Send(!n) WinWaitActive(證書導(dǎo)入向?qū)?正在完成證書導(dǎo)入向?qū)? SLEEP(0 xF4) ControlClick(證書導(dǎo)入向?qū)?正在完成證書導(dǎo)入向?qū)?Button6,left,1) WinWaitActive(證書導(dǎo)入向?qū)?導(dǎo)入成功) SLEEP(0 xF4) ControlClick(證書導(dǎo)入向?qū)?導(dǎo)入成功,Button1,left,1) WinWaitActive(證書,證書信息) SLEEP(0 xF4) ControlClick(證書,證書信息,Button5,left,1) WinWaitClose(證書,證書信息) Else RunA

42、s($rootUserName,ComputerName,$rootPassWord,0,certutil -addstore -f Root $fileSrvPathADCA.cer,) EndIf WinActivate(安全警告) WinWaitActive(安全警告) SLEEP(0 xF4) Send(!y) WinWaitActive(添加帳戶,恭喜您! 您的電子郵件帳戶已成功配置并已準(zhǔn)備就緒) SLEEP(0 xF4) ControlClick(添加帳戶,恭喜您! 您的電子郵件帳戶已成功配置并已準(zhǔn)備就緒,Button9,left,1) ElseIf WinExists(添加帳戶,

43、恭喜您! 您的電子郵件帳戶已成功配置并已準(zhǔn)備就緒) Then WinActivate(添加帳戶,恭喜您! 您的電子郵件帳戶已成功配置并已準(zhǔn)備就緒) WinWaitActive(添加帳戶,恭喜您! 您的電子郵件帳戶已成功配置并已準(zhǔn)備就緒) SLEEP(0 xF4) ControlClick(添加帳戶,恭喜您! 您的電子郵件帳戶已成功配置并已準(zhǔn)備就緒,Button9,left,1) EndIf WinWaitActive(TeamViewer會(huì)議插件) SLEEP(0 xF4) Send(ENTER) WinWaitClose(TeamViewer會(huì)議插件) WinWaitActive(首要事項(xiàng))

44、 SLEEP(0 xF4) Send(!l) SLEEP(0 xF4) Send(!a) SLEEP(0 xF4) WinMinimizeAll() SLEEP(0 xF4) Run(C:Program FilesMicrosoft OfficeOffice16lync.exe) WinWaitActive(Skype for Business,查找聯(lián)系人或聊天室) Exit #cs SLEEP(0 xE8) If WinExists(快速提示) Then WinClose(快速提示) WinWaitClose(快速提示) EndIf SLEEP(0 xE8) If WinExists(Sky

45、pe for Business,關(guān)閉程序) Then WinActivate(Skype for Business,關(guān)閉程序) WinWaitActive(Skype for Business,關(guān)閉程序) SLEEP(0 xF4) Send(!c) WinWaitClose(Skype for Business,關(guān)閉程序) Else Exit EndIf #ceEndFunc;自動(dòng)登錄域賬戶Func _autoLogin() WinMinimizeAll() If IsAdmin() Then If $userName = Then Global $userName = InputBox(輸入

46、,請(qǐng)輸入用戶名:,) Global $userPassword = InputBox(輸入,請(qǐng)輸入密碼:,) EndIf ShellExecute(SystemDir & compmgmt.msc) WinWaitActive(計(jì)算機(jī)管理,計(jì)算機(jī)管理(本地) SLEEP(0 xF4) Send(DOWN) SLEEP(0 xF4) Send(DOWN) SLEEP(0 xF4) Send(DOWN) SLEEP(0 xF4) Send(DOWN) SLEEP(0 xF4) Send(DOWN) SLEEP(0 xF4) Send(RIGHT) SLEEP(0 xF4) Send(DOWN) S

47、LEEP(0 xF4) Send(DOWN) SLEEP(0 xF4) Send(TAB) SLEEP(0 xF4) Send(ENTER) WinWaitActive(Administrators 屬性,常規(guī)) SLEEP(0 xF4) Send(!d) WinWaitActive(選擇用戶、計(jì)算機(jī)、服務(wù)帳戶或組,選擇此對(duì)象類型(&S):) SLEEP(0 xF4) ControlSetText(選擇用戶、計(jì)算機(jī)、服務(wù)帳戶或組,選擇此對(duì)象類型(&S):,RichEdit20W1,$userName) SLEEP(0 xF4) Send(!c) WinWaitActive(Windows 安全

48、) SLEEP(0 xF4) ControlSetText(Windows 安全,Edit1,$itUserName) SLEEP(0 xF4) ControlSetText(Windows 安全,Edit2,$itPassword) SLEEP(0 xF4) ControlClick(Windows 安全,Button2,left,1) WinWaitActive(選擇用戶、計(jì)算機(jī)、服務(wù)帳戶或組,選擇此對(duì)象類型(&S):) SLEEP(0 xF4) ControlClick(選擇用戶、計(jì)算機(jī)、服務(wù)帳戶或組,選擇此對(duì)象類型(&S):,Button5,left,1) WinWaitActive(

49、Administrators 屬性,常規(guī)) SLEEP(0 xF4) ControlClick(Administrators 屬性,常規(guī),Button3,left,1) WinActivate(計(jì)算機(jī)管理,本地用戶和組組) WinWaitActive(計(jì)算機(jī)管理,本地用戶和組組) SLEEP(0 xF4) WinClose(計(jì)算機(jī)管理,本地用戶和組組) WinWaitClose(計(jì)算機(jī)管理,計(jì)算機(jī)管理(本地) SLEEP(0 xF4) RegWrite(HKEY_LOCAL_MACHINE64SOFTWAREMicrosoftWindows NTCurrentVersionWinlogon,

50、AutoAdminLogon, REG_SZ, 1) RegWrite(HKEY_LOCAL_MACHINE64SOFTWAREMicrosoftWindows NTCurrentVersionWinlogon, DefaultDomainName, REG_SZ, $domainName) RegWrite(HKEY_LOCAL_MACHINE64SOFTWAREMicrosoftWindows NTCurrentVersionWinlogon, DefaultUserName, REG_SZ, $userName) RegWrite(HKEY_LOCAL_MACHINE64SOFTWARE

51、MicrosoftWindows NTCurrentVersionWinlogon, Defaultpassword, REG_SZ, $userPassword) Else ;RunAs($rootUserName,ComputerName,$rootPassword,0,ShellExecute(SystemDir & compmgmt.msc) MsgBox(64,警告,當(dāng)前用戶無權(quán)操作本地管理員組!,2) EndIfEndFunc;自動(dòng)重啟Func _autoReboot() WinMinimizeAll() MsgBox(64,提示,已完成初始化配置!系統(tǒng)將自動(dòng)重啟!,3) Shut

52、down(6)EndFunc;修改計(jì)算機(jī)名并加域Func _run1() WinMinimizeAll() SLEEP(0 xE8) Global $userName = InputBox(輸入,請(qǐng)輸入用戶名:,) Global $userPassword = InputBox(輸入,請(qǐng)輸入密碼:,) Global $hostName = InputBox(輸入,請(qǐng)輸入計(jì)算機(jī)名:,) If IsAdmin() Then Run(control sysdm.cpl) Else RunAs($rootUserName,ComputerName,$rootPassword,0,control sys

53、dm.cpl) EndIf WinWaitActive(系統(tǒng)屬性,計(jì)算機(jī)名) SLEEP(0 xF4) Send(!c) WinWaitActive(計(jì)算機(jī)名/域更改,計(jì)算機(jī)名(&C):) SLEEP(0 xF4) WinActivate(計(jì)算機(jī)名/域更改,計(jì)算機(jī)名(&C):) ControlSetText(計(jì)算機(jī)名/域更改,計(jì)算機(jī)名(&C):,Edit1,$hostName) SLEEP(0 xF4) ControlCommand(計(jì)算機(jī)名/域更改,計(jì)算機(jī)名(&C):,Button3,Check) SLEEP(0 xF4) ControlSetText(計(jì)算機(jī)名/域更改,計(jì)算機(jī)名(&C):,

54、Edit3,$domainName) SLEEP(0 xF4) ControlClick(計(jì)算機(jī)名/域更改,計(jì)算機(jī)名(&C):,Button6,left,1) WinWaitActive(Windows 安全) SLEEP(0 xF4) ControlSetText(Windows 安全,Edit1,$itUserName) SLEEP(0 xF4) ControlSetText(Windows 安全,Edit2,$itPassword) SLEEP(0 xF4) ControlClick(Windows 安全,Button2,left,1) WinWaitActive(計(jì)算機(jī)名/域更改,歡迎

55、加入) SLEEP(0 xF4) ControlClick(計(jì)算機(jī)名/域更改,歡迎加入,Button1,left,1) Local $i = 0 While $i = 8000 If WinExists(計(jì)算機(jī)名/域更改,帳戶名與安全標(biāo)識(shí)間無任何映射完成) Then WinActivate(計(jì)算機(jī)名/域更改,帳戶名與安全標(biāo)識(shí)間無任何映射完成) WinWaitActive(計(jì)算機(jī)名/域更改,帳戶名與安全標(biāo)識(shí)間無任何映射完成) SLEEP(0 xF4) Send(ENTER) ExitLoop Else SLEEP(0 xE8) $i = $i + 1000 EndIf WEnd WinWaitA

56、ctive(計(jì)算機(jī)名/域更改,確定) SLEEP(0 xF4) Send(ENTER) WinWaitActive(系統(tǒng)屬性,計(jì)算機(jī)名) SLEEP(0 xF4) ControlClick(系統(tǒng)屬性,計(jì)算機(jī)名,Button3,left,1) WinWaitActive(Microsoft Windows) SLEEP(0 xF4) Send(!l) WinWaitClose(Microsoft Windows)EndFunc;修改本地管理員密碼Func _run2() WinMinimizeAll() If IsAdmin() Then Run(net user administrator &

57、 $rootPassword) SLEEP(0 xE8) Else RunAs($rootUserName,ComputerName,$rootPassword,0,net user administrator & $rootPassword,) SLEEP(0 xE8) EndIfEndFunc;創(chuàng)建admin用戶Func _run3() WinMinimizeAll() If IsAdmin() Then Run(net user & $createUserName & & $createUserPassword & /add) Run(net localgroup users & $cr

58、eateUserName & /add) ShellExecute(SystemDir & compmgmt.msc) WinWaitActive(計(jì)算機(jī)管理,計(jì)算機(jī)管理(本地) SLEEP(0 xF4) Send(DOWN) SLEEP(0 xF4) Send(DOWN) SLEEP(0 xF4) Send(DOWN) SLEEP(0 xF4) Send(DOWN) SLEEP(0 xF4) Send(DOWN) SLEEP(0 xF4) Send(RIGHT) SLEEP(0 xF4) Send(DOWN) SLEEP(0 xF4) Send(TAB) SLEEP(0 xF4) Send(

59、ENTER) WinWaitActive(admin 屬性,常規(guī)) SLEEP(0 xF4) ControlCommand(admin 屬性,常規(guī),Button2,Check,) SLEEP(0 xF4) ControlCommand(admin 屬性,常規(guī),Button3,Check,) SLEEP(0 xF4) ControlClick(admin 屬性,常規(guī),Button6,left,1) WinActivate(計(jì)算機(jī)管理,計(jì)算機(jī)管理(本地) WinWaitActive(計(jì)算機(jī)管理,計(jì)算機(jī)管理(本地) SLEEP(0 xF4) WinClose(計(jì)算機(jī)管理,計(jì)算機(jī)管理(本地) WinW

60、aitClose(計(jì)算機(jī)管理,計(jì)算機(jī)管理(本地) Else ;RunAs($rootUserName,ComputerName,$rootPassword,0,net user admin Password1 /add /passwordchg:no,) ;RunAs($rootUserName,ComputerName,$rootPassword,0,net localgroup users admin /add,) ;RunAs($rootUserName,ComputerName,$rootPassword,0,ShellExecute(SystemDir & compmgmt.msc)

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

最新文檔

評(píng)論

0/150

提交評(píng)論