Sign in to follow this  
Followers 0
confused2gether

Loading Screen Help

3 posts in this topic

I threw together a quick fix program for my work to fix the issue with the Windows Updates not working after installing SP3 in XP. Everything works out great except its kinda plain and boring while it is running the processes. Basically this is what happens, you run the program, it prompts you to see if you are sure that you want to run the utility then once you hit yes, it does all the items needed to do and then will throw up a MsgBox up at the end to tell you it is done. Nothing shows you that it is still running during that timeframe which is kinda annoying and I would like it to either display a graphic or a progress bar or something like that if all possible.

Here is the code:

CODE
$start = MsgBox(4, "Windows Update Fix", "This program will attempt to fix the SP3 Windows Update service component. Do you want to continue?", "")

If $start = 6 Then

RunWait(@ComSpec & " /C " & "net stop wuauserv", "", @SW_HIDE)

DirCopy("C:\WINDOWS\SoftwareDistribution", "C:\WINDOWS\SoftwareDistributionOLD", 1)

DirRemove("C:\WINDOWS\SoftwareDistribution", 1)

RunWait(@ComSpec & " /C " & "regsvr32 wuapi.dll /s", "", @SW_HIDE)

RunWait(@ComSpec & " /C " & "regsvr32 wuaueng1.dll /s", "", @SW_HIDE)

RunWait(@ComSpec & " /C " & "regsvr32 wuaueng.dll /s", "", @SW_HIDE)

RunWait(@ComSpec & " /C " & "regsvr32 wucltui.dll /s", "", @SW_HIDE)

RunWait(@ComSpec & " /C " & "regsvr32 wups2.dll /s", "", @SW_HIDE)

RunWait(@ComSpec & " /C " & "regsvr32 wups.dll /s", "", @SW_HIDE)

RunWait(@ComSpec & " /C " & "regsvr32 wuweb.dll /s", "", @SW_HIDE)

RunWait(@ComSpec & " /C " & "net start wuauserv", "", @SW_HIDE)

MsgBox (0, "Windows Update Fix", "The SP3 Windows Update fix has been applied.")

$startLoop = 0

Else

Exit

EndIf

Share this post


Link to post
Share on other sites



How long does it take? if it takes a while, would a progress bar or something of that sort take away from work? What would be cool is if you could get that little window to pop-up that says updates are being installed, you can continue your work. then have a little animated tray icon. *wishes he had any idea of how to do either of those*


Giggity

Share this post


Link to post
Share on other sites

How about this, not a truely accurate bar, but functional ... :P

$start = MsgBox(4, "Windows Update Fix", "This program will attempt to fix the SP3 Windows Update service component. Do you want to continue?", "")
If $start = 6 Then
ProgressOn("Updating...", "Step 1/11", "Working...") 
RunWait(@ComSpec & " /C " & "net stop wuauserv", "", @SW_HIDE)
ProgressSet(10, "Working..." , "Step 2/11")
DirCopy("C:\WINDOWS\SoftwareDistribution", "C:\WINDOWS\SoftwareDistributionOLD", 1)
ProgressSet(20, "Working..." , "Step 3/11")
DirRemove("C:\WINDOWS\SoftwareDistribution", 1)
ProgressSet(30, "Working..." , "Step 4/11")
RunWait(@ComSpec & " /C " & "regsvr32 wuapi.dll /s", "", @SW_HIDE)
ProgressSet(40, "Working..." , "Step 5/11")
RunWait(@ComSpec & " /C " & "regsvr32 wuaueng1.dll /s", "", @SW_HIDE)
ProgressSet(50, "Working..." , "Step 6/11")
RunWait(@ComSpec & " /C " & "regsvr32 wuaueng.dll /s", "", @SW_HIDE)
ProgressSet(60, "Working..." , "Step 7/11")
RunWait(@ComSpec & " /C " & "regsvr32 wucltui.dll /s", "", @SW_HIDE)
ProgressSet(70, "Working..." , "Step 8/11")
RunWait(@ComSpec & " /C " & "regsvr32 wups2.dll /s", "", @SW_HIDE)
ProgressSet(80, "Working..." , "Step 9/11")
RunWait(@ComSpec & " /C " & "regsvr32 wups.dll /s", "", @SW_HIDE)
ProgressSet(90, "Working..." , "Step 10/11")
RunWait(@ComSpec & " /C " & "regsvr32 wuweb.dll /s", "", @SW_HIDE)
ProgressSet(95, "Working..." , "Step 11/11")
RunWait(@ComSpec & " /C " & "net start wuauserv", "", @SW_HIDE)
ProgressOff()
MsgBox (0, "Windows Update Fix", "The SP3 Windows Update fix has been applied.")
$startLoop = 0
Else
Exit
EndIf

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0