
求大神幫忙解釋下這些代碼::公用腳本1如果有兩個參數(shù),立即執(zhí)行任務(wù)@echo offset root=X:windowssystem32set rootx86=X:windowsset wait=pecmd wait 1000 if not exist X:Program FilesWinXShell.exe (set say=%root%pecmd.exe TEAM TEXT set font=L300 T300 R768 B768 $30^|wait 800 set wait=echo ...set xsay=echo ...set show=echo ...set xshow=echo ...) else (set say=start X:Program FilesWinXShell.exe -ui -jcfg wxsUIUI_led.zip -text:::set say=start X:Program FilesWinXShell.exe -ui -jcfg wxsUIUI_led.zip -wait 5 -scroll -top -textset show=start X:Program FilesWinXShell.exe -ui -jcfg wxsUIUI_show.zip -textset xsay=start X:Program FilesWinXShell.exe -code QuitWindow(nil,'UI_LED')set xshow=start X:Program FilesWinXShell.exe -code QuitWindow(nil,'UI_show')set wait=%root%pecmd.exe wait 800)if not %2 == set args1=%1&&set args2=%2&&goto startjob::公用腳本1結(jié)束::動畫化批處理color b0 set a=51set b=35:reset /a a-=2set /a b-=2mode con: cols=%a% lines=%b% if %a% geq 16 if %b% geq 1 goto reif defined desktop (echo desktop ok!) else (set desktop=%USERPROFILE%desktop)::補丁缺少的系統(tǒng)組件if exist %root%sysx64.exe start /w sysx64.exe::移動x86文件到windows目錄move /y %root%*x86.exe %rootx86%:::創(chuàng)建符號鏈接,避免32位程序運行不正常mklink %temp%cmd.exe x:windowssystem32cmd.exe::注冊很方便的右鍵菜單::if exist %root%ShowDrives_Gui_x64.exe start %root%ShowDrives_Gui_x64.exe --Reg-All%root%pecmd.exe link %Desktop%此電腦,%programfiles%winxshell.exe,,%root%icowinxshell.ico%root%pecmd.exe link %Desktop%TightVNC Viewer,%root%tightvnctvnviewer.exe %root%pecmd.exe link %Desktop%iSCSI 發(fā)起程序,%root%iscsicpl.exe,,%root%icoiscsicli.ico%root%pecmd.exe link %Desktop%ghostx64,%root%ghostx64.exe%root%pecmd.exe link %Desktop%netcopy網(wǎng)絡(luò)同傳,%root%netcopyx64.exe%root%pecmd.exe link %Desktop%CGI一鍵還原,%root%cgix64.exe%root%pecmd.exe link %Desktop%BT客戶端,%root%btx64.exe%root%pecmd.exe link %Desktop%ImDisk_Gui鏡像掛載,%root%ShowDrives_Gui_x64.exe::%root%pecmd.exe link %Desktop%DG分區(qū)工具,%root%DiskGeniusx64.exe%root%pecmd.exe link %Desktop%文件共享盤,explorer.exe,B:%root%pecmd.exe link %Desktop%文件共享盤,%programfiles%explorer.exe, B:%root%pecmd.exe link %Desktop%文件共享盤,%windir%winxshell.exe, B:%root%pecmd.exe link %Desktop%Ghost自動網(wǎng)克,%root%startup.bat,netghost,%root%icoghost32.ico%root%pecmd.exe link %Desktop%連接共享,%root%startup.bat,smbcli,%root%icosmbcli.ico%root%pecmd.exe link %Desktop%多播接收,%root%startup.bat,cloud,%root%icouftpd.ico%root%pecmd.exe link %Desktop%多播發(fā)送,%root%uftp.exe,-R 800000,%root%icouftp.ico%root%pecmd.exe link %Desktop%Hou多播發(fā)送,%rootx86%housx86.exe,E:system.wim,%rootx86%housx86.exe%root%pecmd.exe link %Desktop%Hou多播接收,%rootx86%houcx86.exe,I:,%rootx86%houcx86.exe%root%pecmd.exe link %Desktop%伽卡教師端,%rootx86%gakax86.exe,,%rootx86%gakax86.exe%root%pecmd.exe link %Desktop%伽卡學生端,%rootx86%gakax86.exe,student,%rootx86%gakax86.exe%root%pecmd.exe link %Desktop%DG分區(qū)工具,%rootx86%DiskGeniusx86.exe::if exist %programfiles%winxshell.exe start %programfiles%winxshell.exe -code Desktop:Refresh()%root%pecmd.exe kill penetwork.exeif exist %SystemDrive%Program FilesPENetworkpenetwork.reg reg import %SystemDrive%Program FilesPENetworkpenetwork.reg if exist %SystemDrive%Program FilesPENetworkpenetwork.exe start /min %SystemDrive%Program FilesPENetworkpenetwork.exe ::獲得執(zhí)行的任務(wù)名稱%job%for /f tokens=1-2 delims=@ %%a in ('dir /b %root%*@*') do (set %%aset %%b)if not %1 == set job=%1echo 服務(wù)器IP地址為%ip%echo 本次執(zhí)行的任務(wù)%job%:::舊的查找ip方式:::for /f tokens=2 delims== %%a in ('dir /b %root%serverip*') do set ip=%%a:判斷ip值if defined ip (goto runtask) else (%say% 提取服務(wù)器IP中,檢測系統(tǒng)目錄下的ip.txt %font%if exist X:windowssystem32ip.txt @echo 文件存在.準備提取...&&goto txtipif not exist X:windowssystem32ip.txt @echo 文件不存在.dhcp作為服務(wù)器地址...&&goto dhcpip):::檢測服務(wù)器文件并退出:runtaskcd /d %ProgramFiles(x86)%echo cls%say% 正在初始化網(wǎng)絡(luò) %font%%wait%%xsay%::ipconfig /renew>nul::::::::::::::公用腳本開始::::::::::::::::::::::::::::檢測IP腳本開始::::::::::::::set n=0:checkip%xsay%::上報本機ip到服務(wù)器for /f tokens=1,2 delims=: %%a in ('Ipconfig^|find /i IPv4 地址 . . . . . . . . . . . . :') do (for /f tokens=1,2 delims= %%i in ('echo %%b')do set myip=%%i)ipconfig /renew>nulset /a n=%n%+1%say% 第%n%(15)次獲取IP %font% %wait%::循環(huán)開始if not %myip% == goto getipokif %n% == 15 goto getipbuokgoto checkip::獲取ip成功:getipok%xsay%%xshow%::顯示ip:::%show% %myip% %say% 獲取IP成功!本機ip:%myip% 上報中...... %font%%wait%echo .>%myip%tftp %ip% put %myip% client/%myip%%xsay%%say% 上報完畢! %font%%wait%%xsay%goto init::獲取IP失敗:getipbuok%xsay%%xshow%%say% 獲取IP失敗,DHCP服務(wù)不常,或沒有網(wǎng)卡驅(qū)動 %font%%wait%%xsay%::顯示ip::%show% %myip% goto init::::::::::::::檢測IP腳本結(jié)束:::::::::::::

