Command Line Arguments

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
BobDDstryr
Junior Coder
Posts: 38
Joined: Fri Oct 22, 2010 2:47 am

Command Line Arguments

Post by BobDDstryr » Fri Oct 22, 2010 2:55 am

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?

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Fri Oct 22, 2010 8:47 am

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.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts