Hiding the Cancel button in Windows XP Service Pack 3 install (or No Cancel, Back and Finish)»

Yesterday I made my first AutoIT script. Excellent tool for tweaking with installs (and other windows) to make them more suitable for your needs. Go to http://www.autoitscript.com/ for the tool. Best of all, it’s free 🙂

To make the button go away create a new AutoIT script and use the code below. Note: This script was developed for the Norwegian version of SP3 and translated to English. Since I haven’t tested the script on that version, I cannot guarantee that the Windows titles and button caption are 100% correct .

 

Code:

;Hides the AutoIT icon

Opt(“TrayIconHide”,1)

 ; 1st section gives the user a warning that the sevice pack install will start

$PID=SplashTextOn(“INFO from IT”, “Service Pack 3 install starting. Install time approximately 20 – 30 minutes and the machine will reboot automatically after the install”, 250, 200, -1, -1, 4, “10”)
Sleep(10000)
SplashOff()
ProcessWaitClose($PID)

 ; 2nd section is the actual run of the SP3. Runs in passive mode which basically auto accept the license agreement and sets the uninstall folder to default. I also set the /forcerestart to ensure that install is complete. This is of course optional.

Run ( “P:SPXP_SP3_NORi386updateupdate.exe /passive /forcerestart” )

; Wait for the SP3 window to be active
WinWaitActive( “Software Update Installation Wizard”, “” )

; Set the SP3 window active if it doesn’t have focus.
If Not WinActive(“Software Update Installation Wizard”,””) Then WinActivate(“Software Update Installation Wizard”,””)

; Hides the Cancel button
ControlHide ( “Software Update Installation Wizard”, “”, 2 )

; Hides the back button (not really necessary because it’s greyed out, but gives a cleaner look)
ControlHide ( “Software Update Installation Wizard”, “”, 12323 )

; Finish button, same reason as Back button
ControlHide ( “Software Update Installation Wizard”, “”, 12325 )

 

Figure 1: Standard SP3 install window with buttons

 

Figure 2: Running with buttons removed
 All finished!!!

This is a repost of a previously published article due to transition to WordPress

[ad name=”ad-1″]

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.