I need to use Visual Studio to build a .msi file that will execute some commands I have in a .bat with a custom action. I know I can accomplish this by going into the .msi and altering the tables and I've gotten that to work, but it's just a short fix and I need to get this working. In particular I want to execute my custom action on the uninstall.
First thing I tried was writing a .exe that called my .bat. It works stand-alone, but whenever I put the files in the File System and have the custom action run the .exe it just doesn't work. Who knows why..
The other thing I did was have the custom action use cmd.exe with my .bat as an argument. I get an error during the uninstall and the event viewer narrows it down to cmd.exe using /c "[TARGETDIR]batfile.bat very similarly to https://stackoverflow.com/a/6286046/1427105.
Any thoughts that can help me out?