Jump to content
Sign in to follow this  
Guest joefu

Help with creating shortcut

Recommended Posts

Guest joefu

Can anyone help me with my script. I tring to create a short cut that looks like this.

"C:\Program Files\Avant Browser\avant.exe" -install

Every command I try write the shortcut like this.

"C:\Program Files\Avant Browser\avant.exe -install"

Is this even possible with AutoIt?

Here is the commands I tring to use.

$name = @ProgramFilesDir & "\Avant Browser\avant.exe"

$place = $name & ' -install'

FileCreateShortcut(@DesktopDir & $place, @ProgramsCommonDir & "\Avant Browser.lnk")

Share this post


Link to post
Share on other sites
Guest joefu

Thanks. That fixed it. I see my stupid mistake. I was added it to the wrong place.

Thanks again.

Share this post


Link to post
Share on other sites
palagon

Excuse me, but I really want to know

How can I use relative path and file name to create shortcut?

I'v put the script file and the exe file in same folder.

Share this post


Link to post
Share on other sites
MrSpacely

Excuse me, but I really want to know

How can I use relative path and file name to create shortcut?

I'v put the script file and the exe file in same folder.

<{POST_SNAPBACK}>

link files donot have relative paths

Or they use environment variables or real absolute paths

Sometimes you can enter a relative path but windows just changes it to a absolute path when saving.

From what I know real relative paths are not possible in link files (shortcuts)

Its not a batch file.

Share this post


Link to post
Share on other sites
palagon

link files donot have relative paths

Or they use environment variables or real absolute paths

Sometimes you can enter a relative path but windows just changes it to a absolute path when saving.

From what I know real relative paths are not possible in link files (shortcuts)

Its not a batch file.

Now I've found that I can use @ScriptDir MACRO to get the directory and use & to make the absolute path. Thanks anyway.

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.