源碼:
@echo offecho *echo *echo ****************************************************echo * *echo * IIS Server Application Error錯誤自動修復批處理 *echo * 作者:hayden *echo * *echo ****************************************************echo *echo *set /p isok0=開始IIS修復?(y/n)if %isok0%==y goto begingoto forend:beginset userIWAM=IWAM_%COMPUTERNAME%set userIUSR=IUSR_%COMPUTERNAME%:checkIWAMnet user %userIWAM%if %errorlevel%==0 goto checkIUSRgoto netuserIWAM:checkIUSRnet user %userIUSR%if %errorlevel%==0 goto editusergoto netuserIUSR:netuserIWAMnet userset /p tiwam=請輸入正確的“啟動 IIS 進程帳戶”名稱(即以IWAM_開頭的帳戶名稱)?set userIWAM=%ans%goto checkIWAM:netuserIUSRnet userset /p tiusr=請輸入正確的“Internet 來賓帳戶”名稱(即以IUSR_開頭的帳戶名稱)?set userIUSR=%tiusr%goto checkIUSR:edituserecho 重置“啟動 IIS 進程帳戶”密碼為123net user %userIWAM% 123echo 重置“Internet 來賓帳戶”密碼為123net user %userIUSR% 123echo 密碼同步cscript.exe %HOMEDRIVE%InetpubAdminscriptsadsutil.vbs set w3svc/wamuserpass 123cscript.exe %HOMEDRIVE%InetpubAdminscriptsadsutil.vbs set w3svc/anonymoususerpass 123echo *echo *set /p isok1=請測試IIS是否正常?(y/n)if %isok1%==y goto forendcscript.exe %HOMEDRIVE%InetpubAdminscriptssynciwam.vbs -viisresetecho *echo *set /p isok2=請測試IIS是否正常?(y/n)if %isok2%==y goto forendecho 清除MSDTC服務注冊表相關信息reg delete HKLMSYSTEMCurrentControlSetServicesMSDTC /freg delete HKLMSOFTWAREMicrosoftMSDTC /freg delete HKCRCID /fecho 停止并重新安裝MSDTC服務net stop msdtcmsdtc -uninstallmsdtc -installecho 重置“啟動 IIS 進程帳戶”與“Internet 來賓帳戶”密碼net user %userIWAM% 123net user %userIUSR% 123echo 同步IIS metabase中IWAM_MYSERVER的密碼%HOMEDRIVE%InetpubAdminscriptsadsutil.vbs set w3svc/wamuserpass "123"echo 同步COM+應用程序所用的IWAM_MYSERVER密碼cscript.exe %HOMEDRIVE%InetpubAdminscriptssynciwam.vbs -vecho *echo *set /p isok3=請測試IIS是否正常?(y/n)if %isok3%==y goto forendecho 重新注冊相關組件rundll32 %windir%system32inetsrvwamreg.dll, CreateIISPackageregsvr32 %windir%system32inetsrvasptxn.dll /secho *echo *set /p isok4=請測試IIS是否正常?(y/n)if %isok4%==y goto forendecho *echo *echo 如果IIS還不正常的話,我真的解決不了唉,請另請高明吧!:forendecho *echo *@echo 批處理執行完畢,請按任意鍵退出?@echo offpause
您的評論需要經過審核才能顯示
有用
有用
有用