Launch URL to run Windows program using command line switches

Bill Vlahos bvlahos at mac.com
Tue Jul 1 02:34:49 EDT 2014


So I spoke too soon. It looks like the launch command doesn’t actually send command line options but rather sends the command to open the specified document by the specified application. So I can open the application with the document but not actually send it parameters other than to open a document which is not what I’m looking for.

Bill Vlahos

On Jun 30, 2014, at 7:03 PM, Bill Vlahos <bvlahos at mac.com> wrote:

> Skip,
> 
> This is great. I’ve been struggling with this for a couple of weeks now without success.
> 
> This works for me when I point to a .exe file but not if I point to a link file (.lnk) such as in the Start Menu folder. The reason I want to use the .lnk file in Start Menu is that the actual application may be installed in a number of locations (Program Files, Program Files (x86), file server, etc.) but there is always a .lnk file in the Start Menu when the application is installed.
> 
> The cmd window in Windows7 supports command line options for .lnk files so I wonder if this is a LiveCode limitation of the launch command.
> 
> Thanks for the timely posting.
> 
> Bill Vlahos
> 
> On Jun 30, 2014, at 1:21 PM, Magicgate Software - Skip Kimpel <skip at magicgate.com> wrote:
> 
>> Got it working.  Ended up with this to get it working:
>> 
>> launch "c:/Program Files (x86)/MyProgram/file.exe /P
>> "&QUOTE&"myfile.txt"&QUOTE
>> 
>> 
>> On Mon, Jun 30, 2014 at 3:07 PM, Magicgate Software - Skip Kimpel <
>> skip at magicgate.com> wrote:
>> 
>>> Hello LC'ers,
>>> 
>>> I need to launch a function within my LC application.  How would I
>>> properly format a launch URL statement that launches a file with command
>>> line options?  For instance, what I need to launch is:
>>> 
>>> C:\Program Files (x86)\MyProgram\file.exe /P "myfile.txt"
>>> 
>>> Every way I try to format the statement it does not work and get a "can't
>>> open file."
>>> 
>>> Here is what I am currently trying but failing miserably with:
>>> launch url "file:c:\Program Files (x86)\MyProgram\file.exe /P
>>> "&QUOTE&"myfile.txt"&QUOTE
>>> 
>>> Your help is always appreciated!
>>> 
>>> SKIP
>>> 
>>> 
>>> 
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list