Sign in to follow this  
Followers 0
JetlagJad

AutoIT FileInstall() Funciton Error

33 posts in this topic

Something seems to be wrong with Aut2Exe... Whenever I try and compile my script AutoIT says my FileInstall problem has an error:

Posted Image

Even though I have grey.gif right here:

Posted Image

This has never happened before to me and if I change the FileInstall line to a comment then the next FileInstall line will break.

This is the line of code:

FileInstall('C:\AutoIT Projects\UltimateWoW\grey.gif', @WindowsDir & '\UltimateWoW\grey.gif')

Any help would be appreciated :D

Share this post


Link to post
Share on other sites



...Bump..?

Share this post


Link to post
Share on other sites

I created the same folder structure that you have listed here, but I don't receive the error.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

What if you try :

FileInstall("C:\AutoIT Projects\UltimateWoW\grey.gif", @DesktopDir)

That works for me (with a different file path)

Maybe it's permissions-related.

Edited by Inverted

Share this post


Link to post
Share on other sites

Same on me,

I also having trouble with that and it turns out that it is permission related.

The best way to prove is change your output directory like drive D:.


[font="Palatino Linotype"][size="2"]*** The information contained in this post should be considered and certified WORKS ON MY MACHINE ***[/size][/font][font="Palatino Linotype"][size="2"] [/size][/font]

Share this post


Link to post
Share on other sites

Err... I can't, it has to be in the Windows directory.

Possibly a Vista error?

Share this post


Link to post
Share on other sites

So it works?

No,it is not a Vista error.

It just Window's restriction, even you have administrator rights(I believe so, correct me)..


[font="Palatino Linotype"][size="2"]*** The information contained in this post should be considered and certified WORKS ON MY MACHINE ***[/size][/font][font="Palatino Linotype"][size="2"] [/size][/font]

Share this post


Link to post
Share on other sites

So it works?

No,it is not a Vista error.

It just Window's restriction, even you have administrator rights(I believe so, correct me)..

Okay... so do you mind explaining why I've been able to do it previously?

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

Okay... so do you mind explaining why I've been able to do it previously?

Try to add this on top of script and let us know if this will work.

#requireadmin

Edit: typo

Edited by nfaustin

[font="Palatino Linotype"][size="2"]*** The information contained in this post should be considered and certified WORKS ON MY MACHINE ***[/size][/font][font="Palatino Linotype"][size="2"] [/size][/font]

Share this post


Link to post
Share on other sites

Try to add this on top of script and let us know if this will work.

#requireadmin

That was already in it. It makes no difference if it's in it or not.

Share this post


Link to post
Share on other sites

Hi, I just use your code and it works fine.

#requireadmin

MsgBox(0,'FileInstall',FileInstall('D:\PICTURE\WALLPAPER\i4.gif', @WindowsDir & '\i4.gif'))

But this not work if the UltimateWoW folder does not exist.

MsgBox(0,'FileInstall',FileInstall('D:\Black_Hole\PICTURE\WALLPAPER\i4.gif', @WindowsDir & '\UltimateWoW\i4.gif'))

Is UltimateWoW folder exist?


[font="Palatino Linotype"][size="2"]*** The information contained in this post should be considered and certified WORKS ON MY MACHINE ***[/size][/font][font="Palatino Linotype"][size="2"] [/size][/font]

Share this post


Link to post
Share on other sites

Hi, I just use your code and it works fine.

#requireadmin

MsgBox(0,'FileInstall',FileInstall('D:\PICTURE\WALLPAPER\i4.gif', @WindowsDir & '\i4.gif'))

But this not work if the UltimateWoW folder does not exist.

MsgBox(0,'FileInstall',FileInstall('D:\Black_Hole\PICTURE\WALLPAPER\i4.gif', @WindowsDir & '\UltimateWoW\i4.gif'))

Is UltimateWoW folder exist?

Look at the second picture in the first post. The UltimateWoW folder exists...

Share this post


Link to post
Share on other sites

#13 ·  Posted (edited)

Look at the second picture in the first post. The UltimateWoW folder exists...

The screenshot is the source path of the picture.

How about in the Window directory? The output directory to save the file.

BTW,

I follow your folder structure and the file install is okay. I got no error.

Your code is fine. 

Edit: typo

Edited by nfaustin

[font="Palatino Linotype"][size="2"]*** The information contained in this post should be considered and certified WORKS ON MY MACHINE ***[/size][/font][font="Palatino Linotype"][size="2"] [/size][/font]

Share this post


Link to post
Share on other sites

The screenshot is the source path of the picture.

How about in the Window directory? The output directory to save the file.

BTW,

I follow your folder structure and the file install is okay. I got no error.

Your code is fine. 

Edit: typo

Yes, the folder in the Windows directory exists... so why does it not work..?

Share this post


Link to post
Share on other sites

#15 ·  Posted (edited)

As notta, inverted and I said, we tried to replicate but no error found.

Maybe the problem is in your script or the AutoIt installer itself.

You just give the code line

FileInstall('C:\AutoIT Projects\UltimateWoW\grey.gif', @WindowsDir & '\UltimateWoW\grey.gif')

And it works on us based on the code you gave.

I'm using v3.3.0.0 and v3.3.1.1, and no problem with FileInstall() function.

Edited by nfaustin

[font="Palatino Linotype"][size="2"]*** The information contained in this post should be considered and certified WORKS ON MY MACHINE ***[/size][/font][font="Palatino Linotype"][size="2"] [/size][/font]

Share this post


Link to post
Share on other sites

Bump

Share this post


Link to post
Share on other sites

maybe that would work replace the ' with "

FileInstall("C:\AutoIT Projects\UltimateWoW\grey.gif", @WindowsDir & "\UltimateWoW\grey.gif")

Share this post


Link to post
Share on other sites

Bump

What do you expect? Some voodoo happening.

The problem is obviously unreproducible by others. This means you are the problem. You need to double check everything. For example, you are showing some grey file, but is it really .gif?


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

Please stop bumping your posts.

Start using error checking if you want to get serious about finding the issue.

Try

#RequireAdmin
$sDest = @WindowsDir & "\UltimateWoW"
If FileExists("C:\AutoIT Projects\UltimateWoW\grey.gif") Then
    If NOT FileExists($sDest) Then DirCreate($sDest)
    FileInstall("C:\AutoIT Projects\UltimateWoW\grey.gif", $sDest & "\grey.gif", 1)
Else
    MsgBox(4096, "Error", "The source file does not exist")
EndIf

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites

None of them have worked so far..

I've made one other script that has the exact same line two lines in the UltimateWoW script:

#RequireAdmin

FileInstall("C:\AutoIT Projects\UltimateWoW\grey.gif", @WindowsDir & "\UltimateWoW\grey.gif")

Yet this runs and compiles correctly, but the UltimateWoW script doesn't...

Would someone like to tell me what the hell is going wrong?

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