I am creating logon scripts for my network with VBS. I want to be able to display the progress to the user so that we can see what is being done. Is there a way to display step by step what is being done like a batch file?
I have found that opening an instance of IE and writing out to that is a good way of keeping track, you will have to enter the code to write out to the browser but if it is only so that a user can see what is happening then it is quite useful.
Example below
Set objExplorer = WScript.CreateObject("InternetExplorer.Application"
Call Progress_Window
'Define Output Window for progress results
Private Sub Progress_Window
Dbreak = "<br>" & "<br>"
Sbreak = "<br"
objExplorer.Navigate "about:blank"
objExplorer.ToolBar = 0
objExplorer.StatusBar = 0
objExplorer.Width=400
objExplorer.Height = 200
objExplorer.Left = 0
objExplorer.Top = 0
Do While (objExplorer.Busy)
Wscript.Sleep 200
Loop
objExplorer.Visible = 1
objExplorer.Document.Body.InnerHTML = "message goes here and Dbreak will cause a double CRlf" & Dbreak
End Sub
To add extra information you will have to use
objExplorer.Document.Body.InnerHTML = objExplorer.Document.Body.InnerHTML + " next message goes here and Dbreak will cause a double CRlf" & Dbreak
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.