COGNOiSe.com - The IBM Cognos Community

ETL, App Development and other tools => Automation => Topic started by: pricter on 18 Jul 2012 06:32:35 AM

Title: Batch File - Pop up window
Post by: pricter on 18 Jul 2012 06:32:35 AM
Hi to all,

I want to create a batch file in which the user will select to continue the process through a pop up window yes or no.

I know about the
SET /P ANSWER=Do you want to continue (Y/N)?
but this does not create a pop up window.

Any suggestions?
Title: Re: Batch File - Pop up window
Post by: nmcdermaid on 21 Jan 2013 09:01:57 PM
You can't create a pop up window from a batch file. The easiest way is probably using VBScript. You can use a piece of VBScript to pop up a question like that but the difficult part is sending the reply back to DOS.

For example, open up notepad, paste this in and save the file as question.VBS

Now double click it to see what it does.

Dim iResult
iResult = msgbox("A question",4)
call msgbox("return code is " & iResult)


To call this from a batch file you use something like this:

wscript <path to your VBS file>

Post back if you would like more help.