[wix-users] Getting JSON Settings File to Survive Major Upgrade

Bryan Dam bryand at recastsoftware.com
Wed Dec 22 07:39:02 PST 2021


Thanks Bevan and Rob for the suggestions and confirming that I wasn't totally missing something obvious.

I initially rejected the 'load and resave' pattern thinking I didn't want to have to parse the settings themselves.  Then I realized I didn't need to, just load the whole json text file and write it without ever inspecting the content.  Works just great, thanks again for the suggestion.

FWIW: The 'empty folder left behind' is a red herring and unrelated.  It's still a problem but I believe it's down to file-in-use issues but that's just a guess.  We have custom actions to remove the IIS site and app pool but the installer can't know that so throws files in use warnings and leaves an empty installation folder behind.

-----Original Message-----
From: wix-users <wix-users-bounces at lists.wixtoolset.org> On Behalf Of Rob Mensching via wix-users
Sent: Tuesday, December 21, 2021 5:33 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Cc: Rob Mensching <rob at firegiant.com>
Subject: Re: [wix-users] Getting JSON Settings File to Survive Major Upgrade

Easiest solution: Read settings (if they exist) very early, write settings out always (new or from previous install).

- - - - - - - - - - - - - - -
I provide short answers on wix-users. Full commercial support is offered by FireGiant at https://nam11.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.firegiant.com%2Fservices&data=04%7C01%7Cbryand%40recastsoftware.com%7C633f05bdaae14a031e4b08d9c4d1d516%7C9315bb44634846c6bd378880b87e774e%7C0%7C0%7C637757228238202616%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=b%2BVRlbddYy7sU7az9Z%2B6UbCeOhvj0WFTKxSuq9xeST4%3D&reserved=0


-----Original Message-----
From: wix-users <wix-users-bounces at lists.wixtoolset.org> On Behalf Of Bevan Weiss via wix-users
Sent: Tuesday, December 21, 2021 2:00 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Cc: Bevan Weiss <bevan.weiss at gmail.com>
Subject: Re: [wix-users] Getting JSON Settings File to Survive Major Upgrade

Surviving Major Upgrade but still disappearing at the end of use seems like a tough challenge.

I've got a bad solution.
On uninstall register a RunOnce action to delete the files/folder.
On install remove any such RunOnce entry.

I'm probably wrong, but I've always consider major upgrade just an uninstall->reinstall with some installer settings migrated across. So this would survive such a process.


There's likely a better solution though.


Regards,
Bevan

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant https://nam11.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.firegiant.com%2F&data=04%7C01%7Cbryand%40recastsoftware.com%7C633f05bdaae14a031e4b08d9c4d1d516%7C9315bb44634846c6bd378880b87e774e%7C0%7C0%7C637757228238202616%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=Bzh4GYlxO0hSvEjYs0oWnkL%2FyyV6CTw%2FNQRYDk13%2BT8%3D&reserved=0



More information about the wix-users mailing list