Sign in to follow this  
Followers 0
Iczer

FileInstall() and fileversion of file it holds

4 posts in this topic

#1 ·  Posted

If there a some way from inside compiled script to know which version of dll file FileInstall() holds without writing it on disk first?

 

 

Share this post


Link to post
Share on other sites



#2 ·  Posted

The included file for install looks to be stored here inside the compiled executable:

\Installer.exe\.rsrc\RCDATA\SCRIPT

It's encoded though so... yeah...

Smarter people will comment soon hopefully

Share this post


Link to post
Share on other sites

#3 ·  Posted

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

Share this post


Link to post
Share on other sites

#4 ·  Posted

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.

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