Jump to content

Help with creating shortcut


Guest joefu
 Share

Recommended Posts

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

Link to comment
Share on other sites

  • 9 months later...

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.

Link to comment
Share on other sites

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.

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...