itman2000my Posted September 11, 2006 Posted September 11, 2006 Hello All,need yr help.Me using Win2K server and i hv created a batch file to run db2 scripts.In the DB2 scripts, i would need to key in 2 parameters, ie. From_Date and To_Date. Below is the example:- check_failures 2006-09-01 2006-09-11The above is working fine in CMD prompt. What i want is to run this script directly from Windows Desktop as a shortcut and let the user key in the dates from Windows itself, ie. the user do not see the command prompt at all. Yr help is much appreciated.Thanks in advance.
Yzöwl Posted September 12, 2006 Posted September 12, 2006 (edited) You should probably be looking at using vbscriptexample.vbsDim shSet sh = WScript.CreateObject("WScript.Shell")Dim fromisfromis = Inputbox("Please enter the 'date from'", "From Date")Dim uptoisuptois = Inputbox("Please enter the 'date to'", "To Date")sh.Run "check_failures " & fromis & " " & uptoisSet sh = NothingThis is a very basic example with no error trapping etc. If you require any further help with this you should post your request in the Programming (C++, Delphi, VB, etc.) forum Edited September 12, 2006 by Yzöwl
itman2000my Posted September 15, 2006 Author Posted September 15, 2006 Bro,Thanks a lot. We don't carry programming tools around here, so batch file it is.Anyway, i hv found out how to handle this:- set /p dStartDate=Start Date: set /p dEndDate=End Date: thanks
Yzöwl Posted September 15, 2006 Posted September 15, 2006 You should probably be looking at using vbscriptWe don't carry programming tools around hereVbscripting is built into your operating system!Anyway, i hv found out how to handle this:- set /p dStartDate=Start Date: set /p dEndDate=End Date:But you saidWhat i want is to run this script directly from Windows Desktop as a shortcut and let the user key in the dates from Windows itself, ie. the user do not see the command prompt at all. That not only shows the command prompt, but forces the user to key in dates from the command console, not from the Windows itself!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now