|
|||||||
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
||||
|
||||
|
How can I force an update if new version is lower than installed version?
This question might sounds a bit stupid and I feel that I have painted myself a bit into a corner. The situation is that my current version is called 2007.x.xxx while my new version is 8.0.xxx. So it’s a bit difficult to tell TrueUpdate that v8 is actually newer then v2007. If you have any suggestions to how I can fix this, I would be very, very happy. This is what I have tried, but it did not work.
Code:
------------------------------------------
-- Identify the Installed Version
------------------------------------------
-- Read the installed version information from the registry
g_InstalledVersion = Registry.GetValue(g_RegMainKey, g_RegSubKey, g_RegValueName);
error = Application.GetLastError();
if(error ~= 0) then
SessionVar.Set("%ErrorMessage%", TrueUpdate.GetLocalizedString("ERR_DETECT_VERSION_FAILED").."\r\n".._tblErrorMessages[error]);
Screen.Show("Update Failed");
Application.ExitScript();
end
-- If the installed version is older than the target version, we need to perform the update
local nSpecialVerTest = String.ToNumber( String.GetWordNum( g_InstalledVersion, 1, ".") ) ;
if nSpecialVerTest <= 2007 and nSpecialVerTest > 1990 then
gUpdateRequired = true;
elseif(String.CompareFileVersions(g_InstalledVersion, g_TargetVersion) == -1) then
g_UpdateRequired = true;
else
g_UpdateRequired = false;
end
-- Exit if an update isn't required
if not g_UpdateRequired then
Screen.Show("Update Not Required");
Application.ExitScript();
end
Stein Inge Haaland |
|
#2
|
||||
|
||||
|
Stein - I'm sorry my "fix" didn't work for you.
Since I "warranty" all my work -- I want to get you going ... I have sent you several emails (no response) on how to replicate it -- I have never had an install that I could test with -- if you would email me a link that I can download the "old version" I can test the update process.. if you've fixed the "name change" issue; the code I provided should have taken care of your "version scheme" change (2007.x.x.x to 8.x.x.x) Please email me with details and I will work with you to resolve this new issue (version # scheme change) at no-charge. -josh |
|
#3
|
||||
|
||||
|
Not to worry Josh
Your e-mails have arrived but since we live on different sides of this globe, I was well asleep when you where buisy working. I have sent you a private e-mail and I assume you will have fixed this in no time when you get up in the morning. I'm very happy with all your work so far, so dont worry my friend best regards Stein Inge Haaland, up north at the snowy and cold little Norway |
![]() |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Unable to find software? | NigelLacey | Visual Patch 2.0 | 4 | 10-11-2005 11:35 AM |
| Sorry quick question Boolean | slafta | AutoPlay Media Studio 5.0 | 3 | 06-05-2005 01:37 AM |
| Displaying new update version | Tek | TrueUpdate 1.0 | 1 | 04-14-2004 10:46 AM |
| Determining what Version of Internet Explorer is Installed | Desmond | AutoPlay Media Studio 5.0 Examples | 0 | 10-03-2003 11:59 AM |
| HOWTO: Detect Acrobat Version | Support | AutoPlay Media Studio 4.0 Examples | 0 | 10-22-2002 05:01 PM |
All times are GMT -6. The time now is 09:16 AM.








Linear Mode

