Jump to content

Run a shortcut


Recommended Posts

Hi,

I want to run a *.lnk file via autoit. I cannot just run the linked file because it's a link to a system control icon.

But useing the run command autoit returns a error: "unable to execute external program".

What can I do to run this file? Or is there a easy and secure way to start a system conrtol icon (Win XP - classical view)?

Link to comment
Share on other sites

  • Moderators

The first thing you can do is show how your trying to use the Run() command to run the .lnk file.

Edit:

Another thing to do could be to Use the Search Function, you'll see many different ways to do what your asking.

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Hi,

I want to run a *.lnk file via autoit. I cannot just run the linked file because it's a link to a system control icon.

But useing the run command autoit returns a error: "unable to execute external program".

What can I do to run this file? Or is there a easy and secure way to start a system conrtol icon (Win XP - classical view)?

FileGetShortcut ( "lnk" )
INI TreeViewA bus station is where a bus stops, a train station is where a train stops. Onmy desk I have a work station...
Link to comment
Share on other sites

FileGetShortcut ( "lnk" )

Thanks for your help, but how can I run the Program after I have used the FileGetShortcut command? I've stored it in a variable but don't know how to go on.

It looks like that by know:

$Sounds = FileGetShortcut("Path")

I've tried run($Sounds[0]) but it didn't work.

Link to comment
Share on other sites

  • Moderators

Does this work?

Run('"' & $Sounds[0] & '"')

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

try running the link using _RunDOS.

_RunDOS("start C:\this_is_the_link.lnk")

does that do the trick? I have a link that I have to use to run a program (it is a shortcut with additional DOS commands) and it works using this way.

Amp Energy Drink: the official sponsor of me scripting at 2AM.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...