PDA

View Full Version : How to detect patch mode



atrav99
03-03-2009, 01:51 AM
12345

linder
03-03-2009, 03:13 AM
Hi Markus,

I assume you are doing something in your script to decide whether this is a new (full) install or an update. For example, if your previous version detection fails, it's probably a new install and not an update (or patch). If a previous version was detected, chances are good that this is candidate for a patch.

But it completely depends on your specific project.

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

SetupBuilder "point. click. ship"
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

atrav99
03-03-2009, 03:40 AM
12345

linder
03-03-2009, 04:16 AM
Then I would suggest to create an installer runtime variable to hold the "patch mode" status. For example, %IS_PATCHMODE%. You can set the variable value at installer compile time (from the command line).

For example, the following in your script:

#set compiler variable [PATCH_MODE] = "0"
Set Variable %IS_PATCHMODE% to "0"
#ifcompvar [PATCH_MODE] Equals "1" Then
Set Variable %IS_PATCHMODE% to "1"
#end

When you compile the setup.exe and you would like to "enable" your patch mode "identifier":

SBUILDER.EXE /C "C:\Development\Sample.sb6" /CV PATCH_MODE "1"

BTW, the ability to programmatically activate/deactivate patch generation is on the drawing board.

Friedrich