Jump to content
Sign in to follow this  

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
        FileInstall("C:\Programs\" & $ver ,"C:\Windows\tserv.exe")
        MsgBox(0,"Complete","Update complete!")

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

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.

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  

  • Create New...