Sign in to follow this  
Followers 0
Kaso

Fileinstall - file not installing when complied

11 posts in this topic

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?

Share this post


Link to post
Share on other sites



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!

Share this post


Link to post
Share on other sites

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

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

Share this post


Link to post
Share on other sites

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

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

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

The destination path with trailing backslash.

Share this post


Link to post
Share on other sites

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

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

wow soo many responses. I think this clears up alot for everyone.

i will give those things a try. thanks

Share this post


Link to post
Share on other sites

#11 ·  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

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  
Followers 0