Hi,
I would like a Parameter to a script that I have written that runs as a NT Service.
I do not know if the MACRO_PARMS could be used here, in which case how do I get information into it?
Thanks
Passing Parameter to Script
Moderators: JRL, Dorian (MJT support)
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
From the HELP file:
msched C:\MacroPath\Example Script.scp /filename=testfile.txt /path=c:\outpath\
As a general practice I now usually include full path and file extension for script names, so I would useWhen running a Macro from the command line in this way, you can also pass parameter values into the script :
msched Example Script /filename=testfile.txt /path=c:\outpath\
The above example runs a script called 'Example Script' and passes two variable values in filename and path. These variables can be used in the usual way within the script, e.g. :
Change Directory>path
ifFileExists>filename,ok
Goto>end
Label>ok
Message>File Exists !!
Label>end
msched C:\MacroPath\Example Script.scp /filename=testfile.txt /path=c:\outpath\
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!