RE: message and batch file
From: Jrex7 (Jrex7_at_discussions.microsoft.com)
Date: 11/19/04
- Next message: Matt T: "Re: Creating Multiple FTP Users and Containers (2000 Server + IIS)"
- Previous message: Tom Lavedas: "RE: Script that delay a process"
- In reply to: Tom Lavedas: "RE: message and batch file"
- Next in thread: Tom Lavedas: "RE: message and batch file"
- Reply: Tom Lavedas: "RE: message and batch file"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 19 Nov 2004 08:21:02 -0800
Tom, Thank you so much for your help. It is working as expected.
I have now created a second script to enable the same application that was
disabled after the DBA finishes working on the database. They should
incorporate a point system to this site. I would have assigned you some very
deserved points. Thank you again.
Three more things.
1- Is there a way of runing a command instead of the batch file. (the batch
file I was running has a one line command to disables the application.)
2- I have a lot of applications that I need to disable at different times. I
was planning to create a script for each application I need to disable. Is
there a way to modify the script you already, so that it will allow me to
select the applications I want to disable and then run either the command to
disable the apps seleted or just run a batch file for the apps selected. (I
was thinking of a window that has lets say five check boxes with the names of
the apps next to them and one single button with the title enable. when the
button is clicked on the script will run the batch file or the command for
each check box selected.Then the last window will pop up again saying "APPS
have been enabled.
3- As you can tell I dont know how to script. But I am a quick learner. Can
you point me in the right direction. How do I start learning the basics and
go from there?
Thank you one more time for all your help.
"Tom Lavedas" wrote:
> 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: Matt T: "Re: Creating Multiple FTP Users and Containers (2000 Server + IIS)"
- Previous message: Tom Lavedas: "RE: Script that delay a process"
- In reply to: Tom Lavedas: "RE: message and batch file"
- Next in thread: Tom Lavedas: "RE: message and batch file"
- Reply: Tom Lavedas: "RE: message and batch file"
- Messages sorted by: [ date ] [ thread ]