Jump to content

AutoIT FileInstall() Funciton Error


 Share

Recommended Posts

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

Link to comment
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]
Link to comment
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]
Link to comment
Share on other sites

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]
Link to comment
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]
Link to comment
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...
Link to comment
Share on other sites

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]
Link to comment
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..?

Link to comment
Share on other sites

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]
Link to comment
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!"

Link to comment
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?

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