Passing variables to command



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

.



Relevant Pages

  • Re: run 2 dos commands using vbScript as a single command
    ... I am trying to change the directory and then run another command all ... This concatenates the contents of the variable folderC to the string ... variable cmd1 is just the literal string "cd folderC", ...
    (microsoft.public.scripting.vbscript)
  • Re: telnet
    ... I have this script that works ok so far, when the script send the command: ... Dim objShell ... 'Send telnet User ...
    (microsoft.public.scripting.vbscript)
  • Re: run 2 dos commands using vbScript as a single command
    ... I am trying to change the directory and then run another command all ... In the current folder? ... Running commands with embedded spaces in the command line and the parameters ...
    (microsoft.public.scripting.vbscript)
  • Re: Open Excel
    ... the simplest way is the Shell code on the click event of a command button: ... Dim FName As String ... I cannot use the hyperlink, I would like the Excel file to open from ...
    (microsoft.public.access.formscoding)
  • Re: set ad permissions
    ... and "Y" is echoed to the command. ... similar works for dsacls. ... but cannot just execute dsacls with VBSCRIPT. ... Dim objShell ...
    (microsoft.public.scripting.vbscript)

Loading