Is it possible to open a popup window using VBScript only? Yes, I _know_ I can do it with JS, but I want to know if it is possible with VBS - if JS can do it, I'd expect MS to make sure that VBS can also do it.
Set WshShell = Wscript.CreateObject("Wscript.Shell"
' 2 is number of seconds window stays open. If you
' leave it out, then window stays open until click OK.
WshShell.popup "Your text message here", 2
Hmmm... that's a great trick, but I was thinking of opening a browser window with a new document in it - like an advertisement, or some info, or something - the VBScript equivalent of JavaScript's "window.open(...)". I'm sorry for not making that clearer in the post.
Wscript.echo or msgbox() will pop up windows on your screen. If you want to open a web window,try something like what I do to popup a log-file in notepad here, by calling the application you want to open- hope it helps:
'************************************************
' CallExecutable Sub
' This sub initializes a command line shell to
' kick off a given script
'************************************************
Sub CallExecutable(strScript,intWindow)
Dim objShell
Set objShell = WScript.CreateObject("WScript.Shell"
objShell.Run strScript,intWindow,TRUE
End Sub
Dim strTempName
strTempName = "C:\temp\test.log
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.