I have a tricky situation. In my application a second one has to be launched on the very first run in order to do some initialization. After the second app has concluded, the first one proceeds to delete it and goes on.
This works exactly as expected and everything seems fine until I launch the application again. Then the "Please wait while windows configures [appname]" windows appears and apparently it restores the second app. Then the cycle goes on.
Looking at many logfile apparently MSI detect that the app folder does not exists anymore and therefore trigger a self-repair in order to restore it ending up in a loop.
Since I cannot easily modify this 2 app logic, I wondered if there was a way to mark the folder as "ignorable" in Wix.
this is the relevant Wix sourcecode:
<StandardDirectory Id="CommonAppDataFolder">
<Directory Id="OurCommon" Name="!(bind.property.ShortManufacturer)">
<Directory Id="OurAppData" Name="OurAppData">
<Component Id="CommonFolderPermissions" Guid="{GUID HERE}">
<CreateFolder>
<util:PermissionEx User="Everyone" GenericAll="yes" CreateFile="yes" DeleteChild="yes" />
</CreateFolder>
</Component>
<Directory Id="DELETEMEAFTERFIRSTRUN" Name="FirstRun" > <-- I'M REFERRING TO THIS ONE
</Directory>
</Directory>
</Directory>
</StandardDirectory>
I am creating the setup with wix v4 (using HeatWave on VS2022)
I have a tricky situation. In my application a second one has to be launched on the very first run in order to do some initialization. After the second app has concluded, the first one proceeds to delete it and goes on.
This works exactly as expected and everything seems fine until I launch the application again. Then the "Please wait while windows configures [appname]" windows appears and apparently it restores the second app. Then the cycle goes on.
Looking at many logfile apparently MSI detect that the app folder does not exists anymore and therefore trigger a self-repair in order to restore it ending up in a loop.
Since I cannot easily modify this 2 app logic, I wondered if there was a way to mark the folder as "ignorable" in Wix.
this is the relevant Wix sourcecode:
<StandardDirectory Id="CommonAppDataFolder">
<Directory Id="OurCommon" Name="!(bind.property.ShortManufacturer)">
<Directory Id="OurAppData" Name="OurAppData">
<Component Id="CommonFolderPermissions" Guid="{GUID HERE}">
<CreateFolder>
<util:PermissionEx User="Everyone" GenericAll="yes" CreateFile="yes" DeleteChild="yes" />
</CreateFolder>
</Component>
<Directory Id="DELETEMEAFTERFIRSTRUN" Name="FirstRun" > <-- I'M REFERRING TO THIS ONE
</Directory>
</Directory>
</Directory>
</StandardDirectory>
I am creating the setup with wix v4 (using HeatWave on VS2022)
Share Improve this question asked Mar 6 at 14:35 Marcomattia MocellinMarcomattia Mocellin 3906 silver badges17 bronze badges1 Answer
Reset to default 0You could give the Components of the files you don't want tracked an empty Guid. That tells the Windows Installer to ignore the files after install.
\<Component Guid='"\>
You are now on the hook to manage the files yourself.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744969380a4603874.html
评论列表(0条)