cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
blaza76
Level 3

Arguments field of the Shortcut table

Hello,

I work with the InstallShield 2009, IS-MSI project. I attempt to create a shortcut with an argument in the table but the argument is not considered. When I implement this in the script then it works. What's wrong with my argument line? I basically want my exe (console application) to stay on after clicking the shortcut and really prefer to do this from the table.

1. Script implementation (works)
...
szParam = ProgramFilesFolder ^ "MyFolder\\Bin\\MyFile.exe";
szCommandline = "CMD.EXE /K " + " \"" + szParam + "\"";
...
AddFolderIcon(...)
...

2. Shortcut implementation in the table (does not work)
Target: [INSTALLDIR]MyFile.exe
Arguments: CMD.EXE /K

***
Thanks!
blaza76
Labels (1)
0 Kudos
(2) Replies
MichaelU
Level 12 Flexeran
Level 12 Flexeran

It looks like you're reversing these. The former would result in a command line similar to cmd.exe /K myfile.exe whereas the latter results in something more like myfile.exe cmd.exe /K (full paths omitted from each case). Does your executable really need to be launched via cmd.exe? If so, cmd.exe needs to be the target of the shortcut instead of myfile.exe. Then its arguments can be something like /K "[INSTALLDIR]myfile.exe".
0 Kudos
blaza76
Level 3

Thank you very much for your reply!

Yes, I realized that by going to the properties of that shortcut and checking the Target string. It got immediately obvious that the EXEs are reversed. Now after changing the order things work properly.

Thanks again,
blaza76
0 Kudos