SetupBuilder Community  

Go Back   SetupBuilder Community > SetupBuilder Software Installation System > SetupBuilder - NNTP

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 10-21-2011, 12:46 AM
NewsArchive NewsArchive is offline
Senior Member
 
Join Date: Jan 2005
Posts: 27,166
Default Decide to "update" or "install"

My ignorance gets in the way -- AGAIN :-)
Running SB.Ver 7.5.3378

I want to look at the WIN.Registry and decide whether to run the
"Initial Install" script or the "Update Install" script.
I have the following code at the beginning of the User-Interface
script area

Set Variable %_SB_REGISTRY_CURRVER% to FUNCTION:Get Registry
SubValue("APP_CurrentVersion") from
"HKEY_LOCAL_MACHINE\SOFTWARE\WeLoopHATS"

If %_SB_ERRORCODE% Does Not Equal "0" Or %_SB_REGISTRY_CURRVER% Less
Than "1.00.02" Then
... initialize some variables and call
Set Active Setup Type to "Initial_Install"
else
... initialize some variables and call
Set Active Setup Type to "Update_Install"
end


If the key
"HKEY_LOCAL_MACHINE\SOFTWARE\WeLoopHATS"
is NOT in the registry I get what I expect--Install Script

If the key
"HKEY_LOCAL_MACHINE\SOFTWARE\WeLoopHATS"
IS IN the registry and the value of "APP_CurrentVersion" is 1.00.03 I
get what I expect--Update Script

BUT -- If the key
"HKEY_LOCAL_MACHINE\SOFTWARE\WeLoopHATS"
IS IN the registry and the value of "APP_CurrentVersion" is 1.00.00 I
fall into the Update script -- should use the Install Script

Any thoughts greatly appreciated
Guy
Reply With Quote
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 12:56 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Copyright © 2004-2012 Lindersoft