Jump to content
Sign in to follow this  
kman

Run .lnk from desktop

Recommended Posts

kman

I have seen these on the forums but have not been able to get any to work.

Here is what I am trying. I think I may be off on my quotes? Thanks for any help!!

Run(@ComSpec & ' /c' @DesktopCommonDir & "NAME.lnk",@SW_HIDE)

Share this post


Link to post
Share on other sites
kman

$file = @DesktopCommonDir & "\NAME.lnk"
Run(@ComSpec & ' /c start "" "' & $file & '"', "", @SW_HIDE)
Was able to get it to work with this one. Thank you! I understand a little of what it is doing but dont totally get all of the quotes and how and why they are used. Just me not understanding it.

Thanks everyone for your time, it is very much appreciated. This is an excellent group!!

Share this post


Link to post
Share on other sites
Helge

If the ShellExecute-method didn't work, then you most likely need to update your AutoIt, as that function

is pretty new. The newest version at the moment is 3.2.2.0.

Share this post


Link to post
Share on other sites
kman

Yes, I had the previous version, I will give the new one a try. Thanks!!!

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.