Windows Vista - Popup messege - Asked By farrukh on 15-Apr-11 03:47 PM

 Dear All

I want to pop up windows (GUI based) from batch files both in windows vista and xp.

any help

Devil Scorpio replied to farrukh on 15-Apr-11 05:52 PM
Hi Farrukh,

There is no direct command available to popup windows (GUI based) from batch file.

But you can show popup window through indirect method

1. Copy & paste the following code in a notepad

if (WScript.Arguments.length < 1) {
    msg = "My Message"
else {
  msg = "";
  for (i = 0; i < WScript.Arguments.length; i++) {
    msg = msg + WScript.Arguments.Item(i) + " ";

2. Save the file as Msgbox.js or whatever.

3. Now create a batch file (eg:- popup.bat)
    write the following code that will call javascript file we have created above
    wscript C:\msgbox.js

4. Save it. Double click or open batch file to popup a message.

Regards :)
farrukh replied to Devil Scorpio on 16-Apr-11 03:36 AM
Hi Devil scorpio ,

That is wonderful it works.

Thanks you