Hi,
So I have a problem deploying SP3 with SCCM 2007 R2. I have a vbscript which starts sp3
installation. I have no problems when script runs when client is logged in. But I have problems on
some computers when the client is logged out and when script runs. Here is an excerpt from my script:
-------
strComputer = "."
sLogHeader = "Windows Xp Sp3" & vbCrLf & vbCrLf
'
' Kuriame objektus
'
Set WshShell = Wscript.CreateObject("Wscript.Shell")
Set WshNetwork = WScript.CreateObject("WScript.Network")
Set objWMI = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer &
"\root\cimv2")
ComputerName = WshNetwork.ComputerName
WshShell.LogEvent vbLogSuccess, sLogHeader & "Windows Xp Sp3 start"
WshShell.Popup "Windows Xp Sp3 start.", TIMEOUT, POPUP_TITLE, vbInformation
Set oEnv = WshShell.Environment("PROCESS")
oEnv("SEE_MASK_NOZONECHECKS") = 1
Set colSessions = objWMI.ExecQuery ("Select * from Win32_LogonSession Where LogonType = 2")
If colSessions.Count = 0 Then
strCommand = "update\update.exe /passive /norestart /nobackup
/log:c:\WindowsXP-KB936929-SP3-x86-ENU.log"
Else
strCommand = "update\XPSp3inst.exe"
End If
i = 0
i = WshShell.Run(strCommand, 1, True)
If (i = 0) Or (i = 3010) Then
WshShell.LogEvent vbLogSuccess, sLogHeader & "Success." & VbCrLf & "Code: " & i
WshShell.Popup "Success", TIMEOUT, POPUP_TITLE, vbInformation
Else
WshShell.LogEvent vbLogError, sLogHeader & "Failure! Code: " & i
WshShell.Popup "Failure!", TIMEOUT, POPUP_TITLE, vbCritical
WScript.Quit(i)
End If
oEnv.Remove("SEE_MASK_NOZONECHECKS")
WScript.Quit(i)
-----
Problem is that on some computers when the user is not logged in script starts, Sp3 install
finishes, but script can't see that update.exe finishes and I have stalled state. SCCM shows that
script is runing and thats all it never ends. I can't see the following entries in the logs
generated by:
WshShell.LogEvent vbLogSuccess, sLogHeader & "Success." & VbCrLf & "Code: " & i
WshShell.Popup "Success", TIMEOUT, POPUP_TITLE, vbInformation
or
WshShell.LogEvent vbLogError, sLogHeader & "Failure! Code: " & i
WshShell.Popup "Failure!", TIMEOUT, POPUP_TITLE, vbCritical
so I assume that the script is in this:
i = WshShell.Run(strCommand, 1, True)
state.
XPSp3inst.exe is compiled autoit script. Initially I used to start only this script from vbscript to
deploy Sp3 and everything worked fine when user was logged in. But I had the same problems as my
described earlier everytime the script was run when the user was logged out and this problem was on
every computer, so I had to make condition. So for now I have the following situation:
When the user is logged out and the script runs - on some computers it finishes without any problems
and on some of them it never ends, even I can see that Sp3 is installed and there is no update.exe
in process list:/ Help me please to find a solution to my problem. Thanks.