Jump to content

FileInstall() and fileversion of file it holds


Recommended Posts

Why not just look up the version of the DLL you want to install when you write your script and hard code the value. You can then optionally use fileinstall to install the DLL if the DLL in the target location already exists but is older than the version you have in your script.
Something like this

#include <Misc.au3>


$sInstallPath = "c:\InstallPath\somefile.dll"
If _VersionCompare ("3.3.1.0",FileGetVersion("$sInstallPath)) = 1 Then
    FileInstall("c:\SourcePath\somefile.dll",$sInstallPath,1)
EndIf

 

"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."- Rick Cook

Link to comment
Share on other sites

well, main point of this topic - is to make script self-sufficient and not rely on hard-coded values, ini-files or something like that.  For now I use  "#AutoIt3Wrapper_Run_Before" plus some registry settings or make it hardcode dll versions in main script automatically. I wanted direct solution without need manual actions on every recompile or any helper scripts.

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