qvex21 Posted April 30, 2012 Share Posted April 30, 2012 (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 April 30, 2012 by qvex21 English is not my native language; please excuse typing errors. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted April 30, 2012 Moderators Share Posted April 30, 2012 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") "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
qvex21 Posted April 30, 2012 Author Share Posted April 30, 2012 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. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now