installation - How to make Wix Toolset ignore folders - Stack Overflow

I have a tricky situation.In myapplication a second one has to be launched on the very first run in

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 badges
Add a comment  | 

1 Answer 1

Reset to default 0

You 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

相关推荐

  • installation - How to make Wix Toolset ignore folders - Stack Overflow

    I have a tricky situation.In myapplication a second one has to be launched on the very first run in

    1天前
    30

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信