Jump to content

Error with FileInstall


Recommended Posts

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

  • Moderators

"C:\Programs\" & $ver

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

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.

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