RE: message and batch file
From: Tom Lavedas (tlavedas_at_hotmail.remove.com)
Date: 11/19/04
- Next message: Tom Lavedas: "RE: message and batch file"
- Previous message: CQL User: "Sending email to Admin"
- In reply to: Tom Lavedas: "RE: message and batch file"
- Next in thread: Jrex7: "RE: message and batch file"
- Reply: Jrex7: "RE: message and batch file"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 19 Nov 2004 05:17:03 -0800
Sorry, typo in the Popup line. Change the occurrence of Yes to YesNo and it
should work, as in ...
BtnCode = WShell.Popup(sQ, TimeOut, sT, YesNo + QuestionMark)
Tom Lavedas
===========
"Tom Lavedas" wrote:
> I would suggest something like this ...
>
> ' DisableApp.vbs
> Const Yes = 6, No =7, YesNo = 4, QuestionMark = 32, TimeOut = 10
> Set WShell = CreateObject("WScript.Shell")
> sQ = "You are about to disable This application, Do you want to continue?"
> sT = "Disable App"
> sCmd = "D:\pathspec\batchname.bat"
> BtnCode = WShell.Popup(sQ, TimeOut, sT, Yes + QuestionMark)
> Select Case BtnCode
> case Yes
> WShell.Run sCmd, 0, True
> WScript.Echo "Your application is now disabled"
> case Else
> WScript.Echo "Your application is still enabled"
> End Select
>
> It is a Windows Script Host (WSH) app written in VBScript. See the
> documentation for WSH at:
>
> WSH 5.6 documentation download (URL all one line)
> http://www.microsoft.com/downloads/details.aspx?FamilyId=01592C48-207D-4BE1-8A76-1C4099D7BBB9&displaylang=en
>
> Tom Lavedas
> ============
>
> "Jrex7" wrote:
>
> > I need a script that will let me display a message window. (for example: "You
> > are about to disable This application, Do you want to continue?" or something
> > similar.) then launch a batch file if the user Clicks on yes. If the user
> > clicks on no or if they dont select anything for 10 seconds the batch file
> > should not run and another message window should display saying someting
> > like... "Your application is still enabled" with only a button to exit.
- Next message: Tom Lavedas: "RE: message and batch file"
- Previous message: CQL User: "Sending email to Admin"
- In reply to: Tom Lavedas: "RE: message and batch file"
- Next in thread: Jrex7: "RE: message and batch file"
- Reply: Jrex7: "RE: message and batch file"
- Messages sorted by: [ date ] [ thread ]