Passing variables to command
- From: engres@xxxxxxxxxxx
- Date: Sun, 3 Feb 2008 15:37:17 -0800 (PST)
I need to run the following command while logged onto the desired
machine using the intended users profile:
"borrow.exe product end_date"
Where
product = minitab or qualitycompanion (one word, no space)
end_date = date the borrowed license will be returned automatically
Note: The date must be in the format dd-mmm-yyyy, where dd is the 2-
digit date, mmm is the 3-letter English abbreviation for the month,
and yyyy is the 4-digit year.
To make this simple the command line syntax is : borrow minitab
end_date
(c:\borrow\borrow.exe minitab 03-mar-2008)
My problem is I can pass the end_date variable to command (DOS)
dim fname
fname=InputBox("Enter the end date in format dd-mmm-yyyy:","Minitab
Borrowing Utility","Date example 12-jan-2008, 03-mar-2008")
Dim objShell
Set objShell = CreateObject("WScript.Shell")
objShell.Run( "%comspec% /k e: & C:\\Borrow\\borrow minitab & fname")
WScript.Quit
MsgBox("License will be returned on: " & fname)
I am new at vbscripting as you can tell. Any help will be greatly
apreciated.
Thank you . Henry
.
- Follow-Ups:
- Re: Passing variables to command
- From: Al Dunbar
- Re: Passing variables to command
- Prev by Date: Re: To drag a file as parameter to script
- Next by Date: Re: Passing variables to command
- Previous by thread: Re: Modify Registry
- Next by thread: Re: Passing variables to command
- Index(es):
Relevant Pages
|
Loading