Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding some kind of progress notification to a script. 6

Status
Not open for further replies.

MISMCSA

MIS
Jun 24, 2004
43
US
Are there any methods that will allow me to add progress notification during the running of a script.

For example, I have a script that mirrors some data and can take about 1 - 2 minutes. Right now you run the script, it looks like nothing is happening, and then a messagebox pops up at the end saying it's done. Is it possible for me to code something that will show a message box, or something like that, saying the updating is taken place?

Thanks for help/suggestions.
 
yep. Got it. Working great now.

I love this scripting. Really helping me with stuff. Now got my script finished and replaced my kixstart script for the one i made.

Thank you all for helping

Patrick
 
This version of Marks outstanding script gives the appearence of stepping through as it calls some other scripts.
Thanks to PHV for pointing me to Marks script which I found a week or two ago, but then could not find this thread again. Special thanks to Mark for coming up with such a cool way to track progress!!
If anybody can see a better way to do what I did with Mark's script below, please share.
Cheers!!



strComputer = "."

Set Shell = wscript.createobject("wscript.shell")
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\default")


stage = 1
If stage > 0 Then
stage = DisplayProgress(stage)
End If
Wscript.sleep 250


Function DisplayProgress(stage)
set x = createobject("internetexplorer.application")
x.navigate2 "about:blank" : x.width = 350 : x.height = 95
x.toolbar = false : x.menubar = false : x.statusbar = false : x.visible = True

x.document.write "<font color=blue>"
x.document.write "<MARQUEE WIDTH=100% BEHAVIOR=ALTERNATE> Applying settings!</MARQUEE><br>"
x.document.title = "Please be patient.... "
x.document.write "<font color=blue>"

Wscript.sleep 100
For n = 1 to 25
x.document.write "|"
wscript.sleep 15
x.document.title = "Stage " & stage & " " & n & " %"
Next

Wscript.sleep 2000
Shell.run "CALL\StpPrcs.vbs", TRUE

For n = 26 to 50
x.document.write "|"
wscript.sleep 10
x.document.title = "Stage " & stage & " " & n & " %"
Next

Wscript.sleep 1500
Set objItem = objWMIService.Get("SystemRestore")
errResults = objItem.Disable("")

For n = 51 to 75
x.document.write "|"
wscript.sleep 10
x.document.title = "Stage " & stage & " " & n & " %"
Next

Wscript.sleep 1500
Shell.run "CALL\DelRgVlu.vbs"

For n = 76 to 100
x.document.write "|"
wscript.sleep 10
x.document.title = "Stage " & stage & " " & n & " %"
Next

Wscript.sleep 2000
Shell.run "CALL\Rbt.vbs"


stage = stage - 1
x.quit
set x = nothing
DisplayProgress = stage

End Function
 
I also played with these scripts but i found another solution. I also made sure it opened an internet explorer window and then made sure it opened a flash file in it. This flah file was showing a bar that constantly moved from one side to another. Users in my network found it to be great and it looks really good. Even put music in it etc.

patrick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top