Nniol
24th November 2006 11:56 UTC
Version check against currently installed version
Hi,
HOw would you access the Exe currently within the archive so that it can have its version checked against a currenlty installed version so that versions are not overwritten with a prior or equivalent versiobn
Nniol
kichik
24th November 2006 12:01 UTC
Use GetDllVersionLocal to get the version information of a local file on the build system. See Include\Library.nsh for a usage example.
Nniol
24th November 2006 12:04 UTC
I can get the version on the local system, but having trouble with GetFileVersion error in macro line 5.....
I need to access the FileVersion of the executable within the archive...
Nniol
kichik
24th November 2006 12:05 UTC
What macro? Are you talking about a file inside another archive and not your installer? You'd have to extract it first.
Nniol
24th November 2006 12:06 UTC
NO... the executable is whithin my install, I need to make sure that its version is greater than the currently installed version....
Nniol
24th November 2006 12:17 UTC
Is GetDllLocalVesion what I require
kichik
24th November 2006 12:19 UTC
The executable in your install could only come from your local machine. Therefore, using GetDllVersionLocal should provide you with the correct version details. Include\Library.nsh provides a perfect usage example for your case, comparing the versions of a local file, also bundled in the installer, and a file on the user's system.
Nniol
24th November 2006 12:33 UTC
Do I need to have added it using File first?
I have my script in a root directory and then all files to be installed are in a child directory called Install.
However
GetDllVersionLocal "Install\$ServiceExeName" $R0 $R1
Can not find the executable..
The command I use later on to add all the files to the Archive is:
File /r .\Install\*.*
Nniol
kichik
24th November 2006 12:36 UTC
There's no need to include the file in order to get its version. The problem in your script is that you use a variable in a compile time command. The compiler can't possibly know what $ServiceExeName will contain at runtime. Use the real file name, without any variables.