I'm trying to create a homemade installer that replicates the functionality of an MSI. I'm running into trouble setting the registry values for my app, specifically the UninstallString, which is supposed to run when you right-click a program and click Uninstall. This was my initial UninstallString:
regedit C:\path\to\app\uninstall.reg & rd /s /q C:\path\to\app
For some reason, the & was not interpreted correctly and it was passed as an argument to regedit, so I tried this
cmd /c "regedit C:\path\to\app\uninstall.reg & rd /s /q C:\path\to\app"
This worked fine, but it showed the console window while uninstalling. Following the advice here, I tried
start /min "..."
and
start /min cmd /c "..."
but they both resulted in an error from the Control Panel, saying the program "was already uninstalled." I also tried it the other way around:
cmd /c start /min "..."
But the black window still popped up.
Is it possible to make this work without having to show the console window?