deltatuk
asked on
Shell Command Question
I am needing to run a program called regfind that needs the following swithes: -y "value to search for" -r "value to change to". The value to search for is hard coded, but I want to be able to set the value to be changed to to be input by the user. How can I call a variable inside the shell command?
You mean something like this ?
Dim Var1
Var1 = Inputbox("Your var")
Shell "app.exe -y=asdfasdfasdf -r=" & Var1
Dim Var1
Var1 = Inputbox("Your var")
Shell "app.exe -y=asdfasdfasdf -r=" & Var1
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If you want to read user input from the command line, simply use the Command() function (built in), example:
strTemp = Command
So when you program is run at the command line, if thats what you mean, Command will contain anything entered by the used after your program:
c:\>myprog.exe blah
Command = blah
Flamer
strTemp = Command
So when you program is run at the command line, if thats what you mean, Command will contain anything entered by the used after your program:
c:\>myprog.exe blah
Command = blah
Flamer
ASKER
Worked perfectly. Thanks for your help.
Enjoy your work, P1