shalini
December 3rd, 1998, 05:20 AM
I want to run a DOS Batch (.bat file) from a VB app. For this I'm using
Shell() in VB. .BAT files can accept parameters.
When I pass param, as it is, to .bat file, it runs fine. ie. :--
RetVal=Shell("abc.bat xyz",vbHide) 'Here xyz is the param value
But when I pass param using a var which has the value for param, it
doesn't work ! i.e. :--
RetVal=Shell("abc.bat ParamVar",vbHide) 'here ParamVar contains the
value for param
Is there any way (any Function) by which paramete(s) can be passed to a
.bat file using variable(s) as in the second case above ???
Is there any special char to put as prefix with the variable containing
parameter value ????
Shell() in VB. .BAT files can accept parameters.
When I pass param, as it is, to .bat file, it runs fine. ie. :--
RetVal=Shell("abc.bat xyz",vbHide) 'Here xyz is the param value
But when I pass param using a var which has the value for param, it
doesn't work ! i.e. :--
RetVal=Shell("abc.bat ParamVar",vbHide) 'here ParamVar contains the
value for param
Is there any way (any Function) by which paramete(s) can be passed to a
.bat file using variable(s) as in the second case above ???
Is there any special char to put as prefix with the variable containing
parameter value ????