I have an installer that I've been working on and noticed that my .bat file that I have launching in a LaunchFile custom action on uninstall isn't running when I uninstall the program from Programs & Features on Windows (testing on both Windows Server 2012 and Windows 10). The .bat file executes fine when I run the uninstall through the installer executable.
I changed the settings for the action and deselected 'Hide program's window' so that I could see what was happening. This revealed that upon getting to the LaunchFile action, it does not actually run a command line but it instead is launching a file explorer to the C:\Windows\system32 directory.
I thought at first it could just be my specific project, but I created a simple test installer that only has a simple .bat file trying to execute on uninstall and I get the same issue. I've tried several combinations of settings on the LaunchFile action to no avail. Any insight would be appreciated, as I can't figure out why it's only not working when uninstalling through Programs & Features.