Command Line Arguments
Moderators: JRL, Dorian (MJT support)
-
- Junior Coder
- Posts: 38
- Joined: Fri Oct 22, 2010 2:47 am
Command Line Arguments
So I wrote a script the other day, that prompts for a driver number, and will then go and pull down those drivers from a network drive. What I would like to do, is put this script on a number of different machines - and call a central script on one machine that then sends a command via rsh to the other machines to run the script. But I realized that I don't know how to pass an argument to these other scripts using macro scheduler. Ideally, I'd convert the script to it no longer prompts for input, but instead uses a value called from the commandline - something like get_driver.scp -driver_number. Is there any way to do something like this with macro scheduler?
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Just pass the variables on the command line:
msched.exe /var1=myval1 /var2=somethingelse
Same with compiled exes.
See command line options in the help file.
msched.exe /var1=myval1 /var2=somethingelse
Same with compiled exes.
See command line options in the help file.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?