User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Visual Basic 4 / 5 / 6 section within the Software Development category of DaniWeb, a massive community of 427,794 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,727 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums

passing parameters in bat file

Join Date: Sep 2006
Posts: 33
Reputation: sendoshin is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 1
sendoshin sendoshin is offline Offline
Light Poster

Re: passing parameters in bat file

  #5  
Oct 1st, 2006
Hrm... It looks like you're setting up the .bat file to pretend it's the script. In that case, my example code is worthless, because that's VB code - not a call to a batch file.

Judging by your .bat file's contents, the .vbs script supports arguments. In this case, just running the script directly (bookinst1.vbs abc bcd) should work just fine.

If, however, you're creating the .bat file because the .vbs script doesnt work the way I just showed you, then the script itself isn't processing its arguments. In this case, you need to get the arguments from the command line into your script:

Dim Args
Args = WScript.Arguments

At this point, Args(1) is the first argument to the script, while Args(2) is the second argument, and so on. Be sure that the script is using the command line arguments properly, or it won't work.

- Sendoshin
Reply With Quote  
All times are GMT -4. The time now is 1:57 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC