Sign in to follow this  
Followers 0
weasel127

Error with FileInstall

3 posts in this topic

When I try running this code with 'Beta Run', everything works out perfectly but when I try and compile it, I get a message box saying 'Invalid FileInstall function'. Is this a bug or is something wrong with my code?

$ver = "tserv_rev120.exe"

$prompt1 = MsgBox(36,"Updater","Start update?")
    If $prompt1=6 Then
        ProcessClose("tserv.exe")
        FileInstall("C:\Programs\" & $ver ,"C:\Windows\tserv.exe")
        Run("C:\Windows\tserv.exe")
        MsgBox(0,"Complete","Update complete!")
    Else
    EndIf

Share this post


Link to post
Share on other sites



"C:\Programs\" & $ver

The source file must be a string and not a variable so that the compiler can extract the filename to include


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

Oops, It's in bold in the help file, I should have read that first. Sorry about that.

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