MAIN.bat 中的内容@echo OFFclstitle 歡迎使用FIS加域軟件加入FIS域...:menuclscolor 0Aecho.echo ===================================================== echo ******** 請輸入您即將進行的操作******** echo ===================================================== echo.echo 1.分配計算機名稱加入FIS域echo.echo 2.將計算機退出FIS域echo.echo 3.添加本地工作組echo.echo 4.修改用戶密碼echo.echo 5.一鍵清除系統垃圾echo.echo 6.修改計算機主頁echo.echo 7.添加IE信任站點、設置安全選項echo.echo Q.退出echo.echo.:choset choice=set /p choice= 請輸入:IF NOT "%choice%"=="" SET choice=%choice:~0,1%if /i "%choice%"=="1" goto changeNameif /i "%choice%"=="2" goto UNJOINDOMAINif /i "%choice%"=="3" goto AddGROUP if /i "%choice%"=="4" goto INIif /i "%choice%"=="5" goto clearallif /i "%choice%"=="6" goto changeindex if /i "%choice%"=="7" goto changeietest if /i "%choice%"=="Q" goto enddecho 輸入有誤,請重新輸入echo.goto cho:changeNameCALL changeName.batpauseGOTO menu::SHUTDOWN -t 0 -r:UNJOINDOMAINCALL UNJOINDOMAIN.BATGOTO menu:AddGROUPCALL AddGROUP.BATGOTO menu:INICALL changepasswd.batGOTO menu:clearallCALL clear.batGOTO menu:changeindexCALL changeindex.batgoto menu:changeietest:changeindexCALL changeietest.batgoto menu:endPAUSEChangename.batECHO ECHO 計算機名稱:%NEWNAME% >> C:\FA1Fnamelist1.batECHO @ECHO OFF >> C:\FA1Fnamelist1.batECHO %NEWNAME%> C:\FA1Fnamelist1.txtECHO %NEWNAME% >> Z:\FA1FnamelistALL.txtCOPY C:\FA1Fnamelist1.txt Z:\FA1Fnamelist.txtNET USE * /D /YclsECHO 請您記下為您分配的計算機名稱::ECHO 此名稱需要在修改計算機名時手動輸入CALL C:\FA1Fnamelist1.batcolor 0Acscript.exe //nologo fis.vbs "%NEWNAME%"GOTO END:SA1Fnet use * /d /ynet use z: \\192.168.0.2\computerList test+123 /user:testcopy z:\SA1Fnamelist.txt c:\for /f "tokens=3,4 delims=_" %%i in (c:\SA1Fnamelist.txt) do set localIP=%%i ECHO %localIP%SET var= %localIP%SET /a var+=1ECHO %var%SET NEWNAME=ICC_SA1_%var%ECHO @ECHO ON > C:\SA1Fnamelist1.batECHO color 0C > C:\SA1Fnamelist1.batECHO ECHO 計算機名稱:%NEWNAME% >> C:\SA1Fnamelist1.batECHO @ECHO OFF >> C:\SA1Fnamelist1.batECHO %NEWNAME%> C:\SA1Fnamelist1.txtECHO %NEWNAME% >> Z:\SA1FnamelistALL.txtCOPY C:\SA1Fnamelist1.txt Z:\SA1Fnamelist.txtNET USE * /D /YCLSECHO 請您記下為您分配的計算機名稱::ECHO 此名稱需要在修改計算機名時手動輸入CALL C:\SA1Fnamelist1.batECHO OFFcolor 0Acscript.exe //nologo fis.vbs "%NEWNAME%"GOTO END:FA2Fnet use * /d /ynet use z: \\192.168.0.2\computerList test+123 /user:testcopy z:\FA2Fnamelist.txt c:\for /f "tokens=3,4 delims=_" %%i in (c:\FA2Fnamelist.txt) do set localIP=%%i ECHO %localIP%SET var= %localIP%SET /a var+=1ECHO %var%SET NEWNAME=ICC_FA2_%var%ECHO @ECHO ON > C:\FA2Fnamelist1.batECHO color 0C > C:\FA2Fnamelist1.batECHO ECHO 計算機名稱:%NEWNAME% >> C:\FA2Fnamelist1.batECHO @ECHO OFF >> C:\FA2Fnamelist1.batECHO %NEWNAME%> C:\FA2Fnamelist1.txtECHO %NEWNAME% >> Z:\FA2FnamelistALL.txtCOPY C:\FA2Fnamelist1.txt Z:\FA2Fnamelist.txtNET USE * /D /YclsECHO 請您記下為您分配的計算機名稱::ECHO 此名稱需要在修改計算機名時手動輸入CALL C:\FA2Fnamelist1.batcolor 0Acscript.exe //nologo fis.vbs "%NEWNAME%"GOTO END:SA2Fnet use * /d /ynet use z: \\192.168.0.2\computerList test+123 /user:testcopy z:\SA2Fnamelist.txt c:\for /f "tokens=3,4 delims=_" %%i in (c:\SA2Fnamelist.txt) do set localIP=%%i ECHO %localIP%SET var= %localIP%SET /a var+=1ECHO %var%SET NEWNAME=ICC_SA2_%var%ECHO @ECHO ON > C:\SA2Fnamelist1.batECHO color 0C > C:\SA2Fnamelist1.batECHO ECHO 計算機名稱:%NEWNAME% >> C:\SA2Fnamelist1.batECHO @ECHO OFF >> C:\SA2Fnamelist1.batECHO %NEWNAME%> C:\SA2Fnamelist1.txtECHO %NEWNAME% >> Z:\SA2FnamelistALL.txtCOPY C:\SA2Fnamelist1.txt Z:\SA2Fnamelist.txtNET USE * /D /YclsECHO 請您記錄為您分配的計算機名稱::ECHO 此名稱需要在修改計算機名時手動輸入CALL C:\SA2Fnamelist1.batcolor 0Acscript.exe //nologo fis.vbs "%NEWNAME%"GOTO END:FA3Fnet use * /d /ynet use z: \\192.168.0.2\computerList test+123 /user:testcopy z:\FA3Fnamelist.txt c:\for /f "tokens=3,4 delims=_" %%i in (c:\FA3Fnamelist.txt) do set localIP=%%i ECHO %localIP%SET var= %localIP%SET /a var+=1ECHO %var%SET NEWNAME=TSB_FA3_%var%ECHO @ECHO ON > C:\FA3Fnamelist1.batECHO color 0C > C:\FA3Fnamelist1.batECHO ECHO 計算機名稱:%NEWNAME% >> C:\FA3Fnamelist1.batECHO @ECHO OFF >> C:\FA3Fnamelist1.batECHO %NEWNAME%> C:\FA3Fnamelist1.txtECHO %NEWNAME% >> Z:\FA3FnamelistALL.txtCOPY C:\FA3Fnamelist1.txt Z:\FA3Fnamelist.txtNET USE * /D /YCLSECHO 請您記錄為您分配的計算機名稱::ECHO 此名稱需要在修改計算機名時手動輸入CALL C:\FA3Fnamelist1.BATcolor 0Acscript.exe //nologo fis.vbs "%NEWNAME%"GOTO END:ENDFIS.VBS 加域On Error Resume NextConst JOIN_DOMAIN = 1Const ACCT_CREATE = 2Const ACCT_DELETE = 4Const WIN9X_UPGRADE = 16Const DOMAIN_JOIN_IF_JOINED = 32Const JOIN_UNSECURE = 64Const MACHINE_PASSWORD_PASSED = 128Const DEFERRED_SPN_SET = 256Const INSTALL_INVOCATION = 262144Dim strDomain,strPassword,strUser,strComputerDim objWMIService,objProcess, objNetworkPublic strUserNamePublic strComputerNamestrDomain = "iccfis.inventec"strUser = "iccfis\us111000"strPassword = "icc+123"strLocalGroup = "administrators"strDCMachine = "DCName"varExitErrorLevel = 0Set objNetwork = CreateObject("work")strHostName = puterNameSet objNetwork = NothingWScript.Echo "使用须知:用该脚本加域可以同时修改计算机名称,并将域用户加入本地管理员组。