|
|
#1 |
|
Junior Member
Join Date: Oct 2006
Posts: 26
|
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 |
|
|
|
|
|
#2 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
Use GetDllVersionLocal to get the version information of a local file on the build system. See Include\Library.nsh for a usage example.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Oct 2006
Posts: 26
|
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 |
|
|
|
|
|
#4 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
What macro? Are you talking about a file inside another archive and not your installer? You'd have to extract it first.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Oct 2006
Posts: 26
|
NO... the executable is whithin my install, I need to make sure that its version is greater than the currently installed version....
|
|
|
|
|
|
#6 |
|
Junior Member
Join Date: Oct 2006
Posts: 26
|
Is GetDllLocalVesion what I require
|
|
|
|
|
|
#7 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
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.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#8 |
|
Junior Member
Join Date: Oct 2006
Posts: 26
|
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 |
|
|
|
|
|
#9 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
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.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|