Windows XP SP3 installation question...
Updated: 02 Dec 2009 | 28 comments
This issue has been solved. See solution.
I need help in suppressing CANCEL button during Windows XP SP3 install.
I'm using /quiet /norestart switches along with the SP3 EXE. Are there any other switches to remove/suppress CANCEL button during the install?
Any help is greatly appreciated.
Thanks,
Ramana
discussion Filed Under:
Comments
Try AutoIT script to suppress CANCEL button
Hi Ramana,
Right now i'm packaging Windows XP SP3 for our SP2 environment and i used AutoIT script to do the job.
Use /passive /nobackup /norestart /log swicthes as
/passive will install with a progress bar
/nobackup will remove the backup for uninstall
/log will create a log file
Try the following AutoIT script:
;===================================================================================================
;Hides the AutoIT icon
Opt("TrayIconHide",1)
; 1st section gives the user a warning that the sevice pack install will start
$PID=SplashTextOn("Windows XP SP3 Installation", "Installing Microsoft Windows XP Service Pack 3. The installation can take 30 minutes. Please wait until the completion message appears.", 450, 85, -1, -1, 4, "10")
Sleep(20000)
SplashOff()
ProcessWaitClose($PID)
;RUN WINDOWS XP SP3 IN PASSIVE MODE WITH NO RESTART, NO BACKUP AND A LOG FILE
Run ( "WindowsXP-KB936929-SP3-x86-ENU.exe /passive /norestart /nobackup /log:c:\WindowsXP-KB936929-SP3-x86-ENU.log" )
; WAIT UNTILL SP3 WINDOW IS ACTIVE
WinWaitActive("Software Update Installation Wizard", "")
; SET SP3 WINDOW ACTIVE IF IT DOESN'T HAVE FOCUS
If Not WinActive("Software Update Installation Wizard","") Then WinActivate("Software Update Installation Wizard","")
; HIDE BACK BUTTON
ControlHide ( "Software Update Installation Wizard", "", 12323 )
; HIDE FINISH BUTTON
ControlHide ( "Software Update Installation Wizard", "", 12325 )
;CHANGE FOCUS TO HELP BUTTON
ControlFocus("Software Update Installation Wizard", "", 9)
; HIDE CANCEL BUTTON
ControlHide ( "Software Update Installation Wizard", "", 2 )
; WAIT UNTILL SP3 WINDOW IS ACTIVE
WinWaitActive("Software Update Installation Wizard", "")
Send("{TAB}")
;HIDE HELP BUTTON
ControlHide ( "Software Update Installation Wizard", "", 9 )
;===================================================================================================
You can actually change the script according to your requirement and it is easy to use.
Let me know if you need anything.
Good luck.
Eshwar
Thanks,
Eshwar
Wow thank you
Thank you Eshwar.
I will definitely give it a try.
I'm aware of AutoIT but never created a script. Let me create an EXE with the above code and install.
Thanks you very much for your solution. I really appreciate it.
Thanks,
Ramana
So that's how you did it!
Nice work Eshwar! Another tool in the old tool belt! :)
Thanks,
Kyle
Symantec Trusted Advisor
For Forum threads, please click "Mark as Solution" if answered.
For all content, please give a thumbs up if you agree with or support the post.
Thanks Kyle
I didn't come to know about AutoIT untill Windows XP SP3 packaging.
Its handy infact. :) and the best part is coverting AU3 to EXE with change of icons. I really liked it.
Thanks,
Eshwar
Thanks,
Eshwar
Good solution Eshwar, thanks
Good solution Eshwar, thanks for your contribution.
Regards,
Paolo
Eshwar -
Eschwar - have you done any AutoIT scripting for the Windows Genuine Advantage update (WindowsXP-KB905474-ENU-x86.exe), as this insists on displaying a dialog for users to accept, despite being passed the usual /quiet /passive /norestart command line options.?
If so, would you mind posting the script to save me having to create one from scratch?
Thanks
EdT
If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.
have you tried
using the /qn to hide the user interface all together? After reboot however WGA will still need to finish the install.
No way
edandrew,
There is no way to suppress the dialog box using install switches. Infact i tried /qn and still no use.
EdT,
I have an AutoIT script shaping up to deal with this situation. I will keep posted ASAP.
Thanks,
Eshwar
Thanks,
Eshwar
Hurrah!
EdT,
I have herewith the complete AutoIT script to install WindowsXP-KB905474-ENU-x86.exe. Instructions are as follows:
1. Create an AutoIT EXE with the following code
2. Place next to WindowsXP-KB905474-ENU-x86.exe [make sure both EXEs are in the same location]
3. Execute the AutoIT exe
CODE:
;====================================================================================================
;HIDE AUTOIT ICON
Opt("TrayIconHide",1)
;MESASGE BOX
$PID=SplashTextOn("Windows Genuine Advantage Notifications", "Installing Microsoft Windows Genuine Advantage Notifications. Please wait until the completion message appears.", 450, 85, -1, -1, 4, "10")
Sleep(20000)
SplashOff()
ProcessWaitClose($PID)
;EXECUTE MAIN EXE
Run ( "WindowsXP-KB905474-ENU-x86.exe /passive /norestart" )
;AUTOMATE NEXT BUTTON CICK
WinWaitActive("Windows Genuine Advantage Notifications - Installation Wizard", "")
If Not WinActive("Windows Genuine Advantage Notifications - Installation Wizard","") Then WinActivate("Windows Genuine Advantage Notifications - Installation Wizard","")
ControlClick("Windows Genuine Advantage Notifications - Installation Wizard", "", 12324)
;AUTOMATE I AGREE & NEXT BUTTON CICK
WinWaitActive("Windows Genuine Advantage Notifications - License Agreement", "")
If Not WinActive("Windows Genuine Advantage Notifications - License Agreement","") Then WinActivate("Windows Genuine Advantage Notifications - License Agreement","")
ControlClick("Windows Genuine Advantage Notifications - License Agreement", "", 1004)
ControlClick("Windows Genuine Advantage Notifications - License Agreement", "", 12324)
;AUTOMATE UNCHECK AND FINISH BUTTON
WinWaitActive("Windows Genuine Advantage Notifications - Installation Complete", "")
If Not WinActive("Windows Genuine Advantage Notifications - Installation Complete","") Then WinActivate("Windows Genuine Advantage Notifications - Installation Complete","")
ControlClick("Windows Genuine Advantage Notifications - Installation Complete", "", 1003)
ControlClick("Windows Genuine Advantage Notifications - Installation Complete", "", 12325)
;INSTALLATION COMPLETION MESSAGE BOX
MsgBox(4096, "Windows Genuine Advantage Notifications", "Windows Genuine Advantage Notifications installation completed successfully.", 60)
;===================================================================================================
Please let me know the feedback.
Thanks,
Eshwar
Thanks,
Eshwar
Nice job again Eshwar
You should post this as an independent Article so you can get points on it. Be sure to post the URL back here so people can vote for you (20 points per "thumbs up" vote after the recent changes to voting!)
Thanks,
Kyle
Symantec Trusted Advisor
For Forum threads, please click "Mark as Solution" if answered.
For all content, please give a thumbs up if you agree with or support the post.
Thank you Kyle
Kyle,
I like your idea of posting an article on Windows XP Sp3 packaging. :)
I will do it as soon as possible so that i can get some juicy and yummy points.
Thank you for your idea. An idea can change life. :)
Thanks,
Eshwar
Thanks,
Eshwar
This is what i was looking for
Eshwar,
You are the man!
I was looking for Windows XP SP3 CANCEL button issue solution for a longtime. I tried your script and its working just fine.
Windows Genuine Advantage Notifications script is good to have. I have tested it in my Microsoft virtual PC and it is working like a champ.
Thank you for your contribution. I [infact we] really appreciate your time and effort on this.
Please keep posted. Thank you.
Ajay.
Windows XP SP3 package
Thank you Kyle.
Guys,
I have posted the Windows XP SP3 install vbscript and AutoIT EXE in the following space on Symantec Connect:
https://www-secure.symantec.com/connect/articles/windows-xp-service-pack-3-packaging
Please feel free to contact me if you have any issues with the sript.
Thank you for your time.
Thanks,
Eshwar
Thanks,
Eshwar
What we did
What we did was run the WindowsXP-KB936929-SP3-x86.exe with a /q /x option to quietly extract the contents to a location of our choosing. Once the extraction is done, under the extracted location, run i386/update/update.exe /quiet /norestart. When run this way the install runs completely silent.
What if the user shuts down?
cigpkg,
That works too, the problem is if the user decides to shutdown or power off while the install is in progress. This is why we wanted to use the /passive switch to show progress but not allow them to cancel.
Thanks,
Kyle
Symantec Trusted Advisor
For Forum threads, please click "Mark as Solution" if answered.
For all content, please give a thumbs up if you agree with or support the post.
You still can prevent
You still can prevent shutdown. The following AutoIT code works for Windows XP provided you are using required silent switches:
#NoTrayIcon
$WM_QUERYENDSESSION = 0x0011
GUIRegisterMsg($WM_QUERYENDSESSION, "Cancel_Shutdown")
GUICreate("PreventShutdownGUI")
GUISetSTate(@SW_HIDE)
While 1
sleep(10)
WEnd
Func Cancel_Shutdown($hWndGUI, $MsgID, $WParam, $LParam)
Return False
EndFunc
I installed Symantec Endpoint Protection managed client on 250 PCs this way:
#NoTrayIcon
; Exit the script after 30 minutes
AdlibEnable( "Shutdown_Machine", 1800000)
$WM_QUERYENDSESSION = 0x0011
GUIRegisterMsg($WM_QUERYENDSESSION, "Cancel_Shutdown")
GUICreate("PreventShutdownGUI")
GUISetSTate(@SW_HIDE)
MsgBox (0, "Symantec Endpoint", "Symantec Endpoint Protection Will be Installed Now" & @CRLF & "Please DO NOT SHUTDOWN This Machine" & @CRLF "Machine Will Restart When Setup is Finished", 10)
RunAs("Administrator", "Domain_Name", "Password", 4, "\\Server_Name\Shared_Folder_Name\Setup.exe")
While 1
sleep(10)
WEnd
Func Cancel_Shutdown($hWndGUI, $MsgID, $WParam, $LParam)
Return False
EndFunc
Func Shutdown_Machine()
Exit
EndFunc
It is worth noting that I changed setup.ini file under [Startup] section as follows:
CmdLine=/l*v "%TEMP%\SEP_INST.LOG"
To:
CmdLine=/q
I don't need the log file, so that I removed [/l*v "%TEMP%\SEP_INST.LOG"] switch.
Thanks!
Hi Eshwar,
Thanks for publishing the code - saves me having to re-learn AutoIT after all these years.
EdT
If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.
I posted this question...
I posted this question here to get the solution for Windows XP Service Pack 3 and you kinow what, along with my issue solution, i got additional solutions also.
I tried Windows Genuine Advantage update solution and it worked for me.
Thank you Eshwar for posting the solutions. I marked the above script as SOLUTION. Please accept my voting points. You really are worth of it.
Now if i have any issues, i know whom to reach ;)
Wow this is sweet!
Thank you Ramana.
I'm glad that i was able to solve your issue. Thank you for voting my comment as a SOLUTION.
I will try to help as much as i can. Keep posting your questions so that i can also get an oppertunity to brush up my skills.
Thank you for your oppertunity and voting. I appreciate it.
Thanks,
Eshwar
Thanks,
Eshwar
This is a great forum
I like this forum very much. I was packaging windows XP Service pack 3 last month and i was forced to use SILENT mode as there was no switch to remove CANCEL button during the installation. This thread provided me the SOLUTION that i'm eagerly looking for. Excellent post guys!
Clarification
I downloaded the Windows XP Service Pack 3 Network Installation Package for IT Professionals and Developers from Microsoft and used this exact command line to distrubute the package: "WindowsXP-KB936929-SP3-x86-ENU.exe" /quiet /norestart
That command does not produce a dialog box. I just pushed that to over 2000 computers and I am sure that there is no UI, much less a progress bar.
I know this has been answered, but I'm confused as to why a 3rd party app would be required to "package" a package that was already intended for distribution in an enterprise.
I apologize, I misunderstood the question. The key was here: Are there any other switches to remove/suppress CANCEL button during the install?
So the /quiet worked, but you needed to know if there are other ways that may provide more utility for a rollout. I would delete my post, but I'm not sure how, so instead I'll add my own clarification to my confused post. Again, sorry.
Franz, The point is that if
Franz,
The point is that if you use /quiet then there is no user indication whatsever that the package is installing outside of the ALtiris Software Delivery dialog if you have that enabled. So a user could potentially shutdown the machine during the installation. So the package wasn't run in our case with /quiet, but with /passive which shows a dialog while the install is in progress.
Thanks,
Kyle
Symantec Trusted Advisor
For Forum threads, please click "Mark as Solution" if answered.
For all content, please give a thumbs up if you agree with or support the post.
No dialog visible
Eshwar-
I'm testing your script in our environment currently. I have never used AutoIT, but it looks like I should spend some time learning it.
I saved the script and converted it into an executable, and now I'm using Altiris Software Delivery to push it to the client together with the SP3 source file. I can see that the job has executed and is running, but I don't see any dialog displayed for the logged in user.
Could it be because I'm running the Altiris Software Delivery job as SYSTEM?
Or could it be because I didn't choose the right option when converting the script into an executable?
Any insight?
Thanks!
David
Dave, In your Program
Dave,
In your Program configuration, you need to set it to run as SYSTEM account (which you did) and also check the "User interaction required". Even though it isn't, you often won't see the dialogs unless this box is checked. I always enable that unless I have a simple script or something that I really DON'T want the user to see.
Thanks,
Kyle
Symantec Trusted Advisor
For Forum threads, please click "Mark as Solution" if answered.
For all content, please give a thumbs up if you agree with or support the post.
It's because you are running it as system
AutoIT relies on dialogs being displayed in order to work correctly. Deployment using service based installers that use the system account will usually fail as there are no dialogs presented in a way that AutoIT can work with.
If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.
Ed, Eshwar originally wrote
Ed,
Eshwar originally wrote the above script for us (he is on my team actually!), and we're running it as SYSTEM (via the Altiris Agent) and it is working fine. The trick is that in the Altiris Program configuration for the package, you check the "User interaction required"; this seems to load more of the SYSTEM account's "user" environment and allows it to be visible, at least that's what I'm going with for now...:)
Thanks,
Kyle
Symantec Trusted Advisor
For Forum threads, please click "Mark as Solution" if answered.
For all content, please give a thumbs up if you agree with or support the post.
Another question
Kyle,
Is your Altiris program configuration also specifying that the install only take place when the user is logged in, or can it happen even with the user logged out? I'm looking at this from the perspective of having more SMS than Altiris experience, but have found with SMS that some apps, eg Autodesk apps, won't install correctly unless you specify SMS installation with the user logged in, even though the install is via the service account which runs with system privileges. Thus I'm of the opinion that it's somehow interacting with the currently logged in user, rather than any user environment associated with the system account.
However, I'm open to any logical analysis of what actually goes on in these circumstances!
If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.
Ed, We have configured to
Ed,
We have configured to only run when a user is logged on, mainly because we usually need to let the user know when something is being installed (particularly when there may be a reboot involved as with a Service Pack). My understanding is that the UI interacts with "session 0" (the console of the system) to display. I haven't done extensive testing around this due to time constraints, but that's how I see it now.
Thanks,
Kyle
Symantec Trusted Advisor
For Forum threads, please click "Mark as Solution" if answered.
For all content, please give a thumbs up if you agree with or support the post.
Would you like to reply?
Login or Register to post your comment.