Advice on using Create EXE from command line

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
ibatey
Newbie
Posts: 10
Joined: Thu Dec 17, 2015 9:24 pm

Advice on using Create EXE from command line

Post by ibatey » Fri Jan 08, 2016 10:13 pm

I'm sure I had this working in the past , but now have a problem.

I'm trying to compile an EXE from the command line using the following script:

Let>script=D:\ibatey\Desktop\IDMB_Quicklinks_v6.scp
Let>exefilename=Quicklinkskoldffg.exe
Let>oOutput=D:\ibatey\Desktop
Let>oicon=D:\ibatey\Pictures\QL_Logo1-1.ico
let>string="D:\Program Files (x86)\Macro Scheduler 14\msrt.exe" -COMPILE "%script%" "%oOutput%\%exeFileName%" -ICON:D:\ibatey\Pictures\QL_Logo1-1.ico

messagemodal>string
RunProgram>cmd /c "%string%"

Everything works OK except that I can't get the icon to change from the default. Can anyone tell me whether my syntax is correct or whether I need to change something. I've tried various combinations of the -ICON parameter with/without spaces, quotes. etc

Effectively the string is:
"D:\Program Files (x86)\Macro Scheduler 14\msrt.exe" -COMPILE "D:\ibatey\Desktop\IDMB_Quicklinks_v6.scp" "D:\ibatey\Desktop\Quicklinkskoldffg.exe" -ICON:D:\ibatey\Pictures\QL_Logo1-1.ico


The icon is OK as it shows OK from the wizard... plus I have also tried it with a couple of standard windows icons.

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

Re: Advice on using Create EXE from command line

Post by Marcus Tettmar » Thu Jan 14, 2016 2:51 pm

It needs the -OPTS: directive in there for an icon. So:

"D:\Program Files (x86)\Macro Scheduler 14\msrt.exe" -COMPILE "D:\ibatey\Desktop\IDMB_Quicklinks_v6.scp" "D:\ibatey\Desktop\Quicklinkskoldffg.exe" -OPTS: -ICON:D:\ibatey\Pictures\QL_Logo1-1.ico

Yeh, looks like the manual is wrong as it shows -OPTS: and -ICON: as mutually exclusive but they're not. It will only look for -ICON if -OPTS is there. I'll make a note to have that corrected in next update.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

ibatey
Newbie
Posts: 10
Joined: Thu Dec 17, 2015 9:24 pm

Re: Advice on using Create EXE from command line

Post by ibatey » Thu Jan 14, 2016 3:14 pm

Aah..
Works perfectly now... didn't think to concatenate the parameters like that, but it makes sense once explained.

Thanks

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