Hi,
I don't want to fail but unless I can reliably reproduce the problem I have no way of knowing that I have solved it...
I have blanks for min/max and WAS using 0 for the attributes, I have now changed this to 0+256+512+1024 (even though I only use one language - english). I did NOT add attribute "1" as I don't think any migration of any type is involved with uninstall???
My packages are automatically created from scratch each time. The only code I "fix" is the upgrade code, so there is no possibility of the other codes not changing.
I have seen two different things happen (I have been concentrating on (2) as I don't have test environment for (1) - with any luck the 2 are related anyway):
(1) End up with multiple packages installed.
This I have seen after manual install of package
(logged on as administrator) and then same
package NetDeployed. Could be NetDeploy
feature...
(2) ONE of my files (a keyfile of a component if that matters) is missing after the uninstall/install. So a self repair happens when I click on the shortcut to it. This I have seen when manually installing (logged on as administrator) the packages (DetDeploy not involved).
This is the complete code I use for the upgrade logic (formatting may be off a bit and I have used Wise/Orca to double check all steps correctly applied):
;--- Look for older/newer versions of the same package (group) -----------
<$HereWeAre "Setting up to automatically uninstall existing packages.">
#define PROPNAME_OLD_PROD_CODES OLDPRODUCTCODES
<$TABLE "Upgrade">
#(
<$Row
UpgradeCode=^<$BSD_UPGRADE_CODE>^
Attributes=^<$VbImbed Stat="256+512+1024">^
Remove="ALL"
ActionProperty="<$PROPNAME_OLD_PROD_CODES>"
>
#)
<$/TABLE>
;--- Want any existing version fully removed prior to install of new package! ---
<$TABLE "InstallExecuteSequence">
<$Row "RemoveExistingProducts" Sequence="1450">
<$/TABLE>
;--- Add the "UPGRADE" property to secure custom properties value --------
dim SecureCustomProperties
SecureCustomProperties = <$WiseObj>.GetProperty("SecureCustomProperties")
if SecureCustomProperties = "" then
SecureCustomProperties = "<$PROPNAME_OLD_PROD_CODES>"
else
SecureCustomProperties =
SecureCustomProperties &
";<$PROPNAME_OLD_PROD_CODES>"
end if
<$HereWeAre "Updating 'SecureCustomProperties'.">
Ok = <$WiseObj>.SetProperty("SecureCustomProperties", SecureCustomProperties)
<$DieIfNotOk>