求助 - Windows XP SP3 安装失败

alvin_liu 2009-09-08 04:16:42
大家好!

最近在帮公司若干部(〉1000)Windows XP sp2升级到sp3,想通过关机脚本进行升级,但经常遇到一个问题是升级到一半停住了,硬盘灯不闪,只能强制关机。重启后就是自动的fallback。。。查看c:\windows\svcpack.log,发现均是停在了下面一行:

904.797: Starting process: C:\WINDOWS\pchealth\helpctr\binaries\HelpSvc.exe /regserver /RAInstall

请问有达人可以给点建议吗?

p.s. 如果我用同一个关机脚本在正常登陆下运行,SP3是每次都可以正常安装的。
...全文
204 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
ljc007 2009-09-11
  • 打赏
  • 举报
回复
for /f "Tokens=*" %%i in ('CD') do set CurDir=%%i
cd "%CurDir%\update"
update.exe /quiet /norestart /passive

这三行拐那么大个弯有什么特殊用意吗?
ljc007 2009-09-11
  • 打赏
  • 举报
回复
把这行:
update.exe /quiet /norestart /passive

改成:
start update.exe /quiet /norestart /passive

可以吗?

你转换以后的VBS代码能贴出来看看么?
alvin_liu 2009-09-10
  • 打赏
  • 举报
回复
问题解决了,我把cmd里的command全部转换成vbscript,用vbs直接运行update.exe就没问题了,看来嵌套的层数越多越容易出这些乱七八糟的问题。。。谢谢各位了
alvin_liu 2009-09-09
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 drifter250771 的回复:]
注销脚本调用试下
[/Quote]

注销脚本调用?能清楚一些吗?
drifter250771 2009-09-08
  • 打赏
  • 举报
回复
注销脚本调用试下
alvin_liu 2009-09-08
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 ljc007 的回复:]
关机脚本源代码贴出来看看?
[/Quote]

看到回复真开心啊,先谢了:


Function Install_SP3()

WriteLog("Installing Windows XP SP3 upgrade......")
objExplorer.Document.WriteLn("<br>Installing Windows XP SP3......")
oShell.CurrentDirectory = "C:\Documents and Settings\All Users\Application Data\1E\SMSNomad\GRP02B72_Cache"
ret = oShell.Run(Chr(34) & INSTALL_COMMAND & Chr(34), 0, True)

If ret <> 0 Then
WriteLog("Failed to install CWD - Windows XP SP3 upgrade with exit code " & ret & ".")
objExplorer.Document.WriteLn("<br>Failed to install Windows XP SP3 upgrade with exit code " & ret & ".")

objExplorer.Document.WriteLn("<br>Installation terminated. Please contact your local helpdesk for more information.")

HouseKeep()
Else
WriteLog("Windows XP SP3 upgrade was successfully installed with exit code " & ret & ". For more details please refer to the log, c:\windows\svcpack.log" & vbNewLine & "============" & vbNewLine & vbNewLine)
objExplorer.Document.WriteLn("<br>Windows XP SP3 upgrade was successfully installed with exit code " & ret & ".")
HouseKeep()
End If
End Function


INSTALL_COMMAND 是一个CMD文件:
======
reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates\Windows XP\SP3\KB936929"

if %errorlevel%==0 goto STDERR

if not exist "C:\Program Files\Common Files\XP SP3" mkdir "C:\Program Files\Common Files\XP SP3"

copy "C:\windows\inf\Sysoc.inf" "C:\Program Files\Common Files\XP SP3\Sysoc_CWD_Silent.inf" /Y

for /f "Tokens=*" %%i in ('CD') do set CurDir=%%i

cd "%CurDir%\update"

update.exe /quiet /norestart /passive

set currentErrorCode=%errorlevel%
if %currentErrorCode% EQU 3010 Set currentErrorCode=0
if %currentErrorCode% NEQ 0 goto NotInst
echo errorlevel=%currentErrorCode%

copy "C:\windows\inf\Sysoc.inf" "C:\Program Files\Common Files\XP SP3\Sysoc_SP3_Silent.inf" /Y


goto END


:BUILDERR
echo Invalid Build name. Application could not be installed>&2
goto END

:NotInst
echo "Application Failed to install Windows XP SP3"
Exit %currentErrorCode%

:STDERR
Echo "XP SP3 already installed"
Exit 1634

:End
EXIT 0

ljc007 2009-09-08
  • 打赏
  • 举报
回复
关机脚本源代码贴出来看看?

6,873

社区成员

发帖
与我相关
我的任务
社区描述
Windows 2016/2012/2008/2003/2000/NT
社区管理员
  • Windows Server社区
  • qishine
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧