Jump to content

FileInstall


DW1
 Share

Recommended Posts

I have done plenty of fileinstalls and never had an issue, but now when I try to compile this:

#include<IE.au3>
#include<file.au3>
#include<guiconstants.au3>
If Not FileExists( @TempDir & "\DR1.ico" ) Then FileInstall( @DesktopDir & "\DR1.ico", @TempDir & "\DR1.ico")
If Not FileExists( @TempDir & "\DR2.ico" ) Then FileInstall( @DesktopDir & "\DR2.ico", @TempDir & "\DR2.ico")
If Not FileExists( @TempDir & "\DR3.jpg" ) Then FileInstall( @DesktopDir & "\DR3.jpg", @TempDir & "\DR3.jpg")
If Not FileExists( @TempDir & "\DR4.ico" ) Then FileInstall( @DesktopDir & "\DR4.ico", @TempDir & "\DR4.ico")

I get this error:

Invalid FileInstall() function:

If Not FileExists( @TempDir & "\DR1.ico" ) Then FileInstall( @DesktopDir & "\DR1.ico", @TempDir & "\DR1.ico"

While running in scite everything works fine, even the fileinstall, the files get placed in the temp dir and everything displays fine... just won't let me compile.

why?

how can I fix this?

Thanks in advance

Link to comment
Share on other sites

that is right

#include<IE.au3>
#include<file.au3>
#include<guiconstants.au3>
If Not FileExists( @TempDir & "\DR1.ico" ) Then FileInstall("C:\DR1.ico", @TempDir & "\DR1.ico")
If Not FileExists( @TempDir & "\DR2.ico" ) Then FileInstall("C:\DR2.ico", @TempDir & "\DR2.ico")
If Not FileExists( @TempDir & "\DR3.jpg" ) Then FileInstall("C:\DR3.jpg", @TempDir & "\DR3.jpg")
If Not FileExists( @TempDir & "\DR4.ico" ) Then FileInstall("C:\DR4.ico", @TempDir & "\DR4.ico")
My UDFs:- _RegEnumKey
Link to comment
Share on other sites

I have done plenty of fileinstalls and never had an issue, but now when I try to compile this:

#include<IE.au3>
#include<file.au3>
#include<guiconstants.au3>
If Not FileExists( @TempDir & "\DR1.ico" ) Then FileInstall( @DesktopDir & "\DR1.ico", @TempDir & "\DR1.ico")
If Not FileExists( @TempDir & "\DR2.ico" ) Then FileInstall( @DesktopDir & "\DR2.ico", @TempDir & "\DR2.ico")
If Not FileExists( @TempDir & "\DR3.jpg" ) Then FileInstall( @DesktopDir & "\DR3.jpg", @TempDir & "\DR3.jpg")
If Not FileExists( @TempDir & "\DR4.ico" ) Then FileInstall( @DesktopDir & "\DR4.ico", @TempDir & "\DR4.ico")

I get this error:

While running in scite everything works fine, even the fileinstall, the files get placed in the temp dir and everything displays fine... just won't let me compile.

why?

how can I fix this?

Thanks in advance

What you can do is extract all your files in a temp folder, and if the files don't exist you can use filemove, if they exists just use filedelete to delete all your temp files, other than that use flag 1 which is overwrite.
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...