Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

send parameter to vb script app from batch file

Status
Not open for further replies.

flippe

Programmer
Aug 29, 2002
2
CA
I have written a batch file that calls a .vbs application. I need to pass an argument from the batch file to the vb script. How do I pass it? How do I use it in the vb script? This is what I have so far:

In the batch file:
applicationName.vbs -p argumentValue
 
flippe,

Assuming you are either NT or >

batch.cmd valuetobepassed

Actual batchfile would be:

VVVVV

applicationName.vbs -p %1

^^^^^

Just that one line ignoring the VV and^^

the %1 is a replaceable parameter

If your running NT or > check START/HELP enter BATCH and then look for SHIFT... Shift allows you to put a number of parameters at the command line and they shift to the left as each parameter completes in the script/batch file.

Hope this helps.
DougCranston
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top