How do I automate compiling of dozens of similar scripts???

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
clickfast
Pro Scripter
Posts: 58
Joined: Wed May 23, 2007 12:04 am

How do I automate compiling of dozens of similar scripts???

Post by clickfast » Sat Jun 30, 2007 9:26 pm

I have dozens of scripts that are all basically the same but customized different user info. I want to automate the process for compling all of them into .EXE files.

Any suggestions?

Thanks!!!!!!!! :lol:

User avatar
JRL
Automation Wizard
Posts: 3532
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Sat Jun 30, 2007 10:03 pm

Create a list of macro names to be compiled then loop through the list using the compile command line ability mentioned in help.
Compiling from the command line:
To compile on the command line run msrt.exe as follows:

msrt.exe -COMPILE source.scp target.exe [-QUIET] [-DEL] [-OPTS:options] [-ICON:iconfile]

Optional switches are shown in square brackets and are as follows:

-QUIET will prevent compiler error/success messages being displayed
-DEL deletes the source script file
-OPTS: then a command line to compile into the executable, e.g.: -OPTS:-NOSYSTRAY /parm1=fred
-ICON: then a .ico file to change the default program icon

Me_again
Automation Wizard
Posts: 1101
Joined: Fri Jan 07, 2005 5:55 pm
Location: Somewhere else on the planet

Post by Me_again » Sat Jun 30, 2007 10:47 pm

Can you put the customized data in an .ini file (MS has functions for reading those) or some other external file so there is only one generic .exe to create?

clickfast
Pro Scripter
Posts: 58
Joined: Wed May 23, 2007 12:04 am

Post by clickfast » Sat Jun 30, 2007 11:03 pm

I use the run program command with the msrt.exe - COMPILE switch and it worked!!!

Thanks! Save me tons of time!!!!! wHOO-hoOO


JRL wrote:Create a list of macro names to be compiled then loop through the list using the compile command line ability mentioned in help.
Compiling from the command line:
To compile on the command line run msrt.exe as follows:

msrt.exe -COMPILE source.scp target.exe [-QUIET] [-DEL] [-OPTS:options] [-ICON:iconfile]

Optional switches are shown in square brackets and are as follows:

-QUIET will prevent compiler error/success messages being displayed
-DEL deletes the source script file
-OPTS: then a command line to compile into the executable, e.g.: -OPTS:-NOSYSTRAY /parm1=fred
-ICON: then a .ico file to change the default program icon

armsys
Automation Wizard
Posts: 1108
Joined: Wed Dec 04, 2002 10:28 am
Location: Hong Kong

Change Default Icon

Post by armsys » Tue Nov 06, 2012 7:27 am

Has anyone tried out the [-ICON:iconfile] option of the msrt.exe?
So far my script won't work. It still displays the default icon.
Run>msrt.exe -COMPILE "C:\sys01.scp" C:\Sys01.exe -ICON:"C:\abc.ico"

User avatar
JRL
Automation Wizard
Posts: 3532
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Tue Nov 06, 2012 5:21 pm

Add "-OPTS:" and remove the quotes from the icon file name. I think there might be something wrong because the process fails if there are quotes around the icon file name yet you would expect to have them on a command line file name. So make sure the icon file path and file name have no spaces then you can safely leave off the quotes in the compile line.

EDIT: Just did some testing and for whatever reason quotes are not needed nor are they permitted around the icon file path and name. Spaces in the path and icon file name are fine. Do not use quotes around the icon file name.

Hope this is helpful.

Code: Select all

msrt.exe -COMPILE "C:\sys01.scp" "C:\Sys01.exe" -OPTS: -ICON:C:\abc.ico

armsys
Automation Wizard
Posts: 1108
Joined: Wed Dec 04, 2002 10:28 am
Location: Hong Kong

Post by armsys » Tue Nov 06, 2012 8:14 pm

Hi JRL,
Thanks for your fast help.
Thanks for taking time to test the script.
Your solution works brillliantly. It's a success.
Adding -OPTS: and quotes causes a fatal msrt.exe error: msrt.exe has stopped working.
Thanks again.

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