IIS报错

风清扬斈 14年前 (2006-11-01) My Diraries 4105 0

1.bat

@echo off
if {%1}=={} @echo Syntax: MSDTC1 Filename&goto :EOF
setlocal ENABLEDELAYEDEXPANSION
set filename=%1
if exist %filename% del /q %filename%
(
@echo Alerter
@echo EventSystem
@echo Browser
@echo TrkWks
@echo Dnscache
@echo Eventlog
@echo PolicyAgent
@echo dmserver
@echo Messenger
@echo Netlogon
@echo NtLmSsp
@echo Netman
@echo PlugPlay
@echo RpcSs
@echo RpcLocator
@echo NtmsSvc
@echo SamSs
@echo lanmanserver
@echo SENS
@echo Schedule
@echo LmHosts
@echo winmgmt
@echo Wmi
@echo W32Time
@echo lanmanworkstation
)>"%TEMP%MSDTC1.TMP"
call :stopdtc>nul 2>&1
for /f "Tokens=*" %%L in (’reg query HKLMSystemCurrentControlSetServices^|FINDSTR /I /B /L /C:"HKEY_LOCAL_MACHINE"’) do (
 set line=%%L
 set key=HKLM!LINE:~18!
 call :subkey "!key!" 
 call :testsvc
)
endlocal
goto :EOF
:stopdtc
sc stop msdtc
goto :EOF
:testsvc
for /f "Tokens=*" %%c in (’@echo !svc!^|findstr /I /B /E /L /G:"%TEMP%MSDTC1.TMP"’) do goto :EOF
set /a start=3
set /a type=0
call :getstart>nul 2>&1
call :gettype>nul 2>&1
if %type% LSS 16 goto :EOF
if %start% NEQ 2 goto :EOF
sc config !svc! start= demand
@echo sc config !svc! start= auto>>%filename%
goto :EOF
:gettype
for /f "Tokens=2,3" %%x in (’reg query "HKLMSystemCurrentControlSetServices!svc!" /V type^|FIND "REG_DWORD"’) do (
 set /a type=%%y
)
goto :EOF
:getstart
for /f "Tokens=2,3" %%x in (’reg query "HKLMSystemCurrentControlSetServices!svc!" /V start^|FIND "REG_DWORD"’) do (
 set /a start=%%y
)
goto :EOF
:subkey
set svc=%~nx1

2.bat

@echo off
setlocal
@echo %WINDIR%System32msdtc.exe -uninstall
%WINDIR%System32msdtc.exe -uninstall
call :delkey "HKCRCID"
call :delkey "HKLMSYSTEMCurrentControlSetServicesMSDTC"
call :delkey "HKLMSYSTEMControlSet001ServicesMSDTC"
call :delkey "HKLMSYSTEMControlSet002ServicesMSDTC"
call :delkey "HKLMSoftwareMicrosoftMSDTC"
@echo %WINDIR%System32msdtc.exe -install
%WINDIR%System32msdtc.exe -install
endlocal
goto :EOF
:delkey
set key=%1
call :delkeyq %key% >nul 2>&1
@echo.
goto :EOF
:delkeyq
REG DELETE %key% /F

3.bat

@echo off
if {%1}=={} @echo Syntax: MSDTC3 Filename&goto :EOF
if not exist %1 Syntax: MSDTC3 Filename - %1 was NOT found.&goto :EOF
setlocal
set filename=%1
for /f "Tokens=*" %%r in ((i)type %filename%(i)) do (
 %%r
)
reg add "HKLMSOFTWAREMicrosoftMSDTCXADLL" /F
regsvr32 mtxoci.dll
endlocal

4.bat

InetpubAdminScripts>adsutil.vbs set w3svc/wamuserpass "1234"
InetpubAdminScripts>synciwam.vbs -v

最后同步IWAM_帐号密码即可

"

相关推荐

  • 网友评论

    • (*)

    最新评论