Sign in to follow this  
Followers 0
qvex21

run( "myshortcut.lnk")

3 posts in this topic

#1 ·  Posted (edited)

Before reading on, let me say that my special problem is already solved.

Now i am just curious: is it possible to start an application from AutoIt via it's windows shortcut?

Background:

I have a windows shortcut pointing to a DOS Application. The shortcut appears as "myshortcut.lnk" in the directory listing.

run( "c:myshortcut.lnk")
doesn't work, nothing happens.

Then i remembered those old-style shortcuts for DOS apps and created a PIF file pointing to the DOS Application. The pif appears as "myshortcut.pif" in the directory listing.

run( "c:myshortcut.pif")
works fine, the DOS app starts.

So in fact i my special problem is solved.

I am just wondering wether it is possible to start an application via it's windows shortcut.

Edited by qvex21

English is not my native language; please excuse typing errors.

Share this post


Link to post
Share on other sites



Hi, qvex21. I have several DOS apps I run from shortcut, but I use ShellExecute instead of Run. Might be worth a try.

ShellExecute(@DesktopDir & "Myshortcut.lnk")

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

Hi, qvex21. I have several DOS apps I run from shortcut, but I use ShellExecute instead of Run. Might be worth a try.

ShellExecute(@DesktopDir & "\Myshortcut.lnk")

Your solution works well. So I don't have to create further pifs on other workstations. Thank you very much.

English is not my native language; please excuse typing errors.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0