Sign in to follow this  
Followers 0
Nurgler

Run a shortcut

7 posts in this topic

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)?

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

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

[center]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.[/center]

Share this post


Link to post
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...

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Does this work?

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


[center]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.[/center]

Share this post


Link to post
Share on other sites

Does this work?

Run('"' & $Sounds[0] & '"')
No it don't.

Share this post


Link to post
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.

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