Problems deploying XP SP3 with SCCM
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, vbInformationSet oEnv = WshShell.Environment("PROCESS")
oEnv("SEE_MASK_NOZONECHECKS") = 1Set 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 Ifi = 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 loged 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:/ Help me please to find a solution to my problem.
Answers
- Using psexec does not make sense at all when using ConfigMgr! I'd deploy XP SP3 using the software updates feature of ConfigMgr.
- Marked As Answer byEric C. MattoonMSFT, ModeratorThursday, September 24, 2009 1:08 PM
- Unmarked As Answer byRimvydas Thursday, September 24, 2009 1:46 PM
- Marked As Answer byEric C. MattoonMSFT, ModeratorThursday, September 24, 2009 2:40 PM
- Debugging custom scripts is beyond the possibilities of such a forum especially when "this script stucks on some clients". You cannot blame ConfigMgr after the program was kicked-off.
- Marked As Answer byEric C. MattoonMSFT, ModeratorThursday, September 24, 2009 2:40 PM
- So run it with Admin Rights, Only When User Logged On, and Allow Users to interact.
OR
Use the preferred method of deploying as an update
Problem solved.
E- Marked As Answer byEric C. MattoonMSFT, ModeratorThursday, September 24, 2009 2:42 PM
All Replies
Hi!
I what to ask, why are you not using standart software updates client? I'm have no experience working with AutoIt, but you can try to use psexec (form PSTools). The command line to install SP3 will be:
psexec \\remotecompname -c SP3.exe arguments update\update.exe /passive /norestart /nobackup /log:c:\WindowsXP-KB936929-SP3-x86-ENU.log
where SP3.exe is service pack compressed file downloaded form MS
MCSE: M+S, SMS/SCCM, CCNA- Edited bySergey Sypalo Thursday, September 24, 2009 8:45 AM
- Using psexec does not make sense at all when using ConfigMgr! I'd deploy XP SP3 using the software updates feature of ConfigMgr.
- Marked As Answer byEric C. MattoonMSFT, ModeratorThursday, September 24, 2009 1:08 PM
- Unmarked As Answer byRimvydas Thursday, September 24, 2009 1:46 PM
- Marked As Answer byEric C. MattoonMSFT, ModeratorThursday, September 24, 2009 2:40 PM
- Hi Torsten!
I'm using software updates feature too, psexec is just example for guys, who likes scripts and harder ways :)
MCSE: M+S, SMS/SCCM, CCNA Hi!
I what to ask, why are you not using standart software updates client? I'm have no experience working with AutoIt, but you can try to use psexec (form PSTools). The command line to install SP3 will be:
psexec \\remotecompname -c SP3.exe arguments update\update.exe /passive /norestart /nobackup /log:c:\WindowsXP-KB936929-SP3-x86-ENU.log
where SP3.exe is service pack compressed file downloaded form MS
Forget autoit, now I'm using it only when the user is logged on. And it works without any problems. I'm using it only because of Microsoft didn't provide an option to disable cancel button during Sp3 installation.
But my problem now is not with autoit as I made condition in my script. When user is not logged on I simply start update.exe with switch'es. And on some computer I can see that the script never ends:/ Also I can see that the service pack was installed completely on these computers. As for now all of our packages are deployed with vbscript because we want to have greater flexibility, like custom messages popups for clients, custom writes to event viewer and so on.
As for software updates we have existing WSUS infrastructure for OS updates. I wanted to integrate SCCM into this infrastructure but failed, as SUP on central site simply can't synchronize with upstream WSUS server, only with Microsoft site directly:/
But I dont understand why this script stucks on some clients and question is about that and not about some kind of workarounds:)- I'm don't understand, why are you need Cancel button when installing SP3, sorry but i'm cannot help with your issue
P.S. I think best way to troubleshoot, why your WSUS on central site with SUP role installed cannot sync with upstream server (glad to help resolve that problem), rather than use script-based and desentralized patch management system. I hope you understand, what i mean
MCSE: M+S, SMS/SCCM, CCNA - Strange that you can't understand such thing:) Have you seen Sp3 installation window? I need progress bar visible for end user if it is logged on. But on this window THERE IS cancel button active and user can press on it at anytime. Mainly because of that I'm using autoit script which hides cancel button. But note, I DO NOT HAVE PROBLEMS with this part. Look at my script again. I have problems only when script is run when there are no logged on users and autoit script is not used at this time there is only update.exe started.
As for WSUS. I have existing wsus infrastructure. Our main ordinary wsus 3.0 server is in dmz zone. Downstream wsus servers are synchronizing from it. As far as I know Microsoft has not left an ability to integrate SCCM into existing wsus servers infrastructure. Are you saying that SCCM can sync with ordinary WSUS 3.0 Sp2 server. I think it simply can't. Correct me if I'm wrong.
And the patch management system is far away from the decentralized one. Patches to clients are delivered via WSUS servers what is rathe easy to maintain and various packages and OS service packs are delivered as SCCM packages.
But I'll repeat again - I want to find out why my script never finishes. This could happen with any software and not with Sp3 deployment so I need to find solution. As i say erlear i'm cannot help with script, but what about WSUS... have samo explanations:
When we install WSUS, we cheched "Store updates locally" box in most cases. For SCCM generally and SUP role exactly you don't need to do that, because SCCM sync from WSUS only actual updates list, not update files. Updates that you need to deploy download by means of SCCM and stored on Distribution Point, not in WSUS "Content" directory. As sayed in this topic http://social.technet.microsoft.com/Forums/en-US/configmgrsum/thread/634b9d5b-cab8-4027-bdae-d0d54ed5d9d5 SCCM does not support using upstream proxy for central site SUP Server. So to deploy SCCM as one solution for clients patch management you can remove internal WSUS server, install SUP role on WSUS Server in DMZ and configure all clients to use them
MCSE: M+S, SMS/SCCM, CCNA- Are you saying that SCCM on the central site downloads updates itself? If yes, then it is not an option for us, because our internal servers can't access internet at all, even http or https. And we have servers in DMZ zone which synchronize updates from this WSUS server. I think that if I remove WSUS from there and if I'll install SUP on that server I'll lost ability to get updates for this server? Right? But I think that this talk is for another topic:)
So back to my initial question - can someone help me with my problem? Using psexec does not make sense at all when using ConfigMgr! I'd deploy XP SP3 using the software updates feature of ConfigMgr.
I'm not using psexec at all and do not plan to use it for such task. And this is not an answer to my problem at all. Can "software updates feature" to bring out custom messages for end user? Can it write custom things to event viewer? Can it send e-mail's for users support on install failure? I think that it can't. I need solution to my problem.- Debugging custom scripts is beyond the possibilities of such a forum especially when "this script stucks on some clients". You cannot blame ConfigMgr after the program was kicked-off.
- Marked As Answer byEric C. MattoonMSFT, ModeratorThursday, September 24, 2009 2:40 PM
- This custom script works without any problems on every client without any user interaction and everytime when the user is logged in even if workstation is locked. I have only problems when users are not logged in. And only thing which I can blame is SCCM and its vbscript kick offs. Sorry for that. I want to be wrong and hope that all bad things are in my script, but I need help, so I wrote here hoping for a help. I thought that my script is very simple for everyone who knows vbscript essentials. Sad that I can't help here:( Sorry for disturbance.
- So run it with Admin Rights, Only When User Logged On, and Allow Users to interact.
OR
Use the preferred method of deploying as an update
Problem solved.
E- Marked As Answer byEric C. MattoonMSFT, ModeratorThursday, September 24, 2009 2:42 PM
- Problem is not solved at all because we have plenty users who log of at night and the night is only the time we deploy software updates. And deploying Sp3 as an update is not flexible at all (current wsus implementation in sccm). Anyway I'll try to open support request with Microsoft, maybe I'll have more luck in there.
And deploying Sp3 as an update is not flexible at all (current wsus implementation in sccm).
Why is it so? You can have software updates installed in a completely silent mode, even suppress reboot if you want. Further, with Maintenance Windows you can schedule and run installations only at night, with nothing being showed to end users.- I recently tested the deployment of Windows Xp Sp3 as a Software Update with SCCM and I must say it worked perfectly. Provided you have everything properly configured the process is completely silent. Next time a user will reboot his machine Sp3 will be there, almost unnoticed.