Skip to content

How can I run a batch file on uninstall with wix toolset 5? #8776

Discussion options

You must be logged in to vote

I have found a way, though it shows a command line window to the user, which isn't particularily desirable. First, I have added the script to the installation folder:

<Component Id="DeleteExplorerShortcuts" Guid="c601f684-d128-41b9-b3e6-153147942f67">
  <File Id="DeleteExplorerShortcutsScript" Name="delete_explorer_context_menu.bat"
        Source="delete_explorer_context_menu.bat" KeyPath="yes" />
</Component>

Then I have referenced it for the custom action instead:

<CustomAction Id="RemoveImageSortKeys" 
              FileRef="DeleteExplorerShortcutsScript" 
              ExeCommand="" 
              Execute="deferred" 
              Return="ignore" 
              Impersonate="no" />

Th…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@Lolle2000la
Comment options

Comment options

You must be logged in to vote
1 reply
@wmanning
Comment options

Answer selected by Lolle2000la
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants