Jump to content
Sign in to follow this  
Dirk98

Shortcuts

Recommended Posts

Dirk98

Can I launch a program with a script by "kicking" the shortcut *.lnk not the *.exe?

If it is possible, which command handles it?

Thanks.

Share this post


Link to post
Share on other sites
frostfel

Can I launch a program with a script by "kicking" the shortcut *.lnk not the *.exe?

If it is possible, which command handles it?

Thanks.

$LnkShort = FileGetShortcut("C:\Notepad.lnk")

Run($LnkShort[0])

Func FileGetShortcut gets .lnk details puts them in array one of the things it gets is the file dirctory which is returned in $var[0]


Share this post


Link to post
Share on other sites
Nahuel

ShellExecute("Shortcut.lnk", "", @DesktopDir )

:)

Share this post


Link to post
Share on other sites
Dirk98

$LnkShort = FileGetShortcut("C:\Notepad.lnk")

Run($LnkShort[0])

Func FileGetShortcut gets .lnk details puts them in array one of the things it gets is the file dirctory which is returned in $var[0]

Thanks, guys. The above was particualry useful.

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.