wixtoolset / issues

WiX Toolset Issues Tracker
http://wixtoolset.org/
129 stars 24 forks source link

Error While Running a Batch File using Custom Action #6102

Closed Sumanthdv closed 4 years ago

Sumanthdv commented 4 years ago

Hi, I'm new to wix. I'm installing my application using Wix Installer. <y Application generates some registry keys. While Uninstalling my Application, I want to delete those Registry Keys generated by my application. For this I'm using a batch file in which I wrote certain commands in order to delete the registry keys. I'm calling this Batch file using a custom action during uninstallation in wix. The batch file contains 5 commands to delete 5 Registry keys. When i uninstall 4 of my registry keys are deleted leaving the 5th Key. The 5th command throws an error : "ERROR: The system was unable to find the specified registry key or value." I checked the path many times, the path is coorect. When i execute the batch file seperately without wix , all the 5 operations are successfull. I get the error only when i run the batch file using wix custom action.

Here is my Batch script :

_**@echo off

Pushd "%~dp0"

REG DELETE "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\ ASaftrusOverlay" /f

REG DELETE "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\ AALinkOverlay" /f

REG DELETE "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\ AAAVolumeOverlay" /f

REG DELETE "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\ AAAALinkGradientIcon" /f

REG DELETE HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v SystemTrayApp /f

pause**_

I'm getting error only with last command only when executed with wix custom action. The first operations are successfully executed with wix custom action. Can someone Help me with this issue.

Thanks, D V Sai Sumanth

robmen commented 4 years ago

For support please contact the wix-users mailing list.

It is possible through discussion a specific bug in the WiX Toolset will be uncovered but usually someone can help you find the error in your .wxs code.