-
My Wix4 msi installer, at the end of the installation process, updates "Program Files/MyApp/appsettings.json" values, from filled out fields, in the Installer UI dialog. If I execute the installer by command prompt run as "administrator" everything works as expected. I'm searching for hours now, but unsuccessfully. Found suggestions:
Any other hint how to get the custom action executed with elevated privileges to get my installer works correctly? PS: the user that executes the installer has admin rights My Package:
My custom action reference:
Installation package sequence:
Part of the custom action:
Instead to update an xml file, it can be very simply be done by wix utils:
Eventually it exists a similar solution to update my "appsettings.json"? Or I should my webapi read the url from an xml file instead of the json file? Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The custom action must have Execute="deferred" and scheduled after InstallInitialize and before InstallFinalize. To use my WiX extension https://www.nuget.org/packages/PanelSwWixExtension4:
|
Beta Was this translation helpful? Give feedback.
The custom action must have Execute="deferred" and scheduled after InstallInitialize and before InstallFinalize.
Using util XmlFile or my extension (see below) also makes sure that the file is properly rolled back on errors
To use my WiX extension https://www.nuget.org/packages/PanelSwWixExtension4: