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 456,481 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 2,818 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: 3
Reputation: neon123 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
neon123 neon123 is offline Offline
Newbie Poster

Re: passing parameters in bat file

  #4  
Oct 1st, 2006
Originally Posted by sendoshin View Post
Is the .bat file set up to take the arguments?

Assuming it is, there might be another thing you need to change. You said "abc" and "bcd" are string variables. Using Shell "n:\aa.bat abc bcd" passes the values "abc" and "bcd" to the batch file. Using Shell "n:\aa.bat " & abc & " " & bcd passes the contents of abc and bcd to the batch file instead. You may need to change this in your code.

If neither of these things lead to a fix, then I don't quite understand what's happening. Perhaps you could give us some more information?

Good luck!

- Sendoshin


thanks for ur reply

actually what i am trying to do is to pass parameters in vbscript file
im doing it through creating a bat file
iam modified the bat file to accept parameters

i jus need to pass parameter along with name of bat file to command prompt

the solution u gave Shell "n:\aa.bat " & abc & " " & bcd ....
when i use this ..it gives an error file not found


i jus need the correct code to send the bat file name along parameters


bat file contents are

wscript bookinst1.vbs %1 %2


i need to send a string values to the bat file
Last edited by neon123 : Oct 1st, 2006 at 4:12 am.
Reply With Quote  
All times are GMT -4. The time now is 2:54 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC