Jump to content

Recommended Posts

Posted

FileInstall("C:\favorite.url", @FavoritesDir, 1)

When I "Go" it installs the shortcut to the favorites directory. however when compling and running the exe it does not. I tried a txt file to install to see if it didn't like the .url file. But same result. Whats the explaination for it?

Posted

it has to be:

FileInstall("C:\favorite.url", @FavoritesDir & "favorite.url", 1)

you forgot the "favorite.url" and to connect @FavoritesDir and "favorite.url" you need the & sign. you can just copy the one i made above, but i also like to explain why it has to be like that.

suc6!

Posted

Mabye its wrong, but i think it has to be like this:

FileInstall("C:\favorite.url", @FavoritesDir & "\favorite.url", 1)

That is correct, the macros that contain paths do not contain the backslash so it has to be concatenated in
Posted

FileInstall("C:\favorite.url", @FavoritesDir & "\", 1)

The destination path with trailing backslash.

does it work with just the path and not the destination filename? i know the helpfile designates the second parameter as "The destination path with trailing backslash." but i've always used the filename too, just because of the example included for that function. I guess i could have just tested it, but i've already typed all of this up...
Posted

To my knowledge, I have never specified the filename. Works like a treat everytime. If you leave out the trailing backslash, then FileInstall fails.

Posted

To my knowledge, I have never specified the filename. Works like a treat everytime. If you leave out the trailing backslash, then FileInstall fails.

neat, that'll save me 6-10 keystrokes per script... i'm waaaaay too lazy...
Posted

I have always used a variable for my installs

that way it can be used throught the script

$Sound_lnk = @TempDir & "\Inst-lnk.wav"
FileInstall("C:\Program Files\Radio\Notify.wav", $Sound_lnk)

8)

NEWHeader1.png

Posted (edited)

I tried to compile the following

FileInstall("c:\abc.url", @favoritesdir & "\", 1)

and got this error

error adding file:

c:\abc.url

I don't get it, the url file is in the root dir. any help would be appreciated. There is sooo much to Autoit. learning so much everyday

Edit.

Never Mind I figured it out. It had something to do with the way I made the shortcut. I deleted it and renamed it. All is well

Edited by Kaso

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
×
×
  • Create New...