Quantcast
Channel: wixsharp Discussions Rss Feed
Viewing all articles
Browse latest Browse all 1354

New Post: Upgrade Error

$
0
0
Hi Oleg,
could you explain me the reason for fail out of upgrade process. Let me delineate my proceeding.
You should know that I have to displace some files from the installdir to a another directory after installFinialize-Step to finish the installation process. After successful deinstallation of the product I remove this directory also normally. On upgrade process this action should be skipped. Unfortunately it fails. I am using an registry entry to verify the current installed version.
Before LaunchConditions step I check the environment, set some session properties and create the directories if required.
1. I included a Majorupgrade element
project.MajorUpgradeStrategy = new MajorUpgradeStrategy
{
UpgradeVersions = VersionRange.ThisAndOlder,//OlderThanThis
PreventDowngradingVersions = VersionRange.NewerThanThis,
RemoveExistingProductAfter = Step.InstallInitialize,//InstallFinalize,
NewerProductInstalledErrorMessage = "Eine neuere Version von [ProductName] existiert bereits",
};
Besides I activated a migration option from majorupgrade using
Compiler.WixSourceGenerated += document => document.Root.Select("Product/Upgrade/UpgradeVersion").AddAttributes("MigrateFeatures=yes");
I am using a unique upgradecode for the product
project.UpgradeCode = new Guid("D510981C-D7A1-4A29-8B45-F58C7950A4FC");
Depend on product version I create a unique project GUID.
Here you see my managed actions:

new ManagedAction("PropertyConfiguration", Return.check, When.Before, Step.LaunchConditions, Condition.Always, Sequence.InstallUISequence),
new ManagedAction("PropertyConfiguration", Return.check, When.Before, Step.LaunchConditions, Condition.Always, Sequence.InstallExecuteSequence),
new ManagedAction("DocuAndDBVersionHandling", Return.check, When.Before, Step.LaunchConditions, Condition.Always, Sequence.InstallExecuteSequence),
/*new ManagedAction("PropertyConfiguration", Return.check, When.Before, Step.LaunchConditions, Condition.NOT_Installed, Sequence.InstallUISequence),
new ManagedAction("PropertyConfiguration", Return.check, When.Before, Step.LaunchConditions, Condition.NOT_Installed, Sequence.InstallExecuteSequence),
new ManagedAction("DocuAndDBVersionHandling", Return.check, When.Before, Step.LaunchConditions, Condition.NOT_Installed, Sequence.InstallExecuteSequence),*/
new ManagedAction("CheckingIsRunning", Return.check, When.After, Step.PreviousAction, Condition.Always, Sequence.InstallExecuteSequence),
//new ManagedAction("CheckingIsRunning", Return.check, When.After, Step.PreviousAction, Condition.NOT_Installed, Sequence.InstallExecuteSequence),
new ManagedAction("OSVersionDetection", Return.check, When.After, Step.InstallInitialize, Condition.Always, Sequence.InstallExecuteSequence),
//new ManagedAction("OSVersionDetection", Return.check, When.After, Step.InstallInitialize, Condition.NOT_Installed, Sequence.InstallExecuteSequence),
//new ManagedAction("FrameworkHandling", Return.check, When.After, Step.PreviousAction, Condition.NOT_Installed, Sequence.InstallExecuteSequence),
//new ManagedAction("DocuAndDBHandling", Return.check, When.After, Step.InstallFinalize, Condition.NOT_Installed, Sequence.InstallExecuteSequence),
new ManagedAction("ShortCutHandling", Return.check, When.After, Step.InstallFinalize, Condition.Installed, Sequence.InstallExecuteSequence),
/*new RegValueProperty("NETFRAMEWORK35", RegistryHive.LocalMachine, @"Software\Microsoft\NET Framework Setup\NDP\v3.5", "ClientInstall", "0"));*/
//new ManagedAction("WriteLog", Return.check, When.After, Step.PreviousAction, Condition.NOT_Installed, Sequence.AdminExecuteSequence),//);
// new Dir(@"[INSTALLDIR]",new File(binaries, @"AppFiles\OldConfigData.exe"),new File(binaries, @"AppFiles\OldConfigData.exe")),
/*new Dir(@"[INSTALLDIR]",
new File(binaries, @"AppFiles\OldConfigData.exe")),*/
//Tools.Instance.DatabaseDirPath //Return.asyncNoWait
new ManagedAction("DirResolution", Return.check, When.After, Step.InstallFinalize, Condition.Always, Sequence.InstallExecuteSequence),
//new ManagedAction("DirResolution", Return.check, When.After, Step.InstallFinalize, Condition.NOT_Installed, Sequence.InstallExecuteSequence),

new ManagedAction("RemoveStep", Return.check, When.After, Step.RemoveExistingProducts, Condition.Installed));
Regards,
Olga

Viewing all articles
Browse latest Browse all 1354

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>