user584018
user584018

Reputation: 11304

Removing entire user account footprint on uninstall Wix

When I did MSI install (Wix), we create a virtual user account which visible under User plus a user is also created within C:\Users.

enter image description here

Now on un-install of MSI, I would like to remove all the virtual user account also to be removed, how to achieve this ?

One way I'm aware to remove the folder, but what about removing user ?

<Fragment>
    <Directory Id="TARGETDIR" Name="SourceDir">
        <Directory Id="$(var.PlatformProgramFilesFolder)">
    <Directory Id="INSTALLFOLDER" Name="XYZ">
    </Directory>
        </Directory>
    </Directory>
</Fragment>

Upvotes: 1

Views: 121

Answers (1)

AndrejH
AndrejH

Reputation: 2109

You can set the RemoveOnUninstall to yes in the UserElement. Look at this reference.

Upvotes: 4

Related Questions