Question

I am having some issue uninstalling my application from CE devices.

I have a SHCreateShortcut on my application initialization SHCreateShortcut(@"\Windows\StartUp\Daemon.lnk", "\"" + "Program Files\Daemon\Daemon.exe" + "\"");

I uninstall it, but after reboot the device still asks to run. I get the following message: The file "Daemon" cannot be opened. Either it is not signed with a trusted certificate, or one of it's components cannot be found. If the problem persists, try reinstalling or restoring this file

I want to know if there is a proper way to un-install the application, how do I prevent this issue from happening?

I would like to know if there is a way in the uninstaller to remove the StartUp link or on the installer of the next version.

Was it helpful?

Solution

Of course. The way you do it, your program creates a shortcut, not the installer. Thus the installer does not know it should remove the shortcut, too, so the startup shortcut remains on the device and upon every restart, the system tries to run the application, as it is still linked in the startup folder.

Instead of having your program create the shortcut, you need to have the installer create the shortcut (and remove the code that creates the shortcut from your application).

To have the installer create the shortcut, right-click your CAB setup project and select "View > File System" (may be called differently, as I'm using a German Visual Studio, but I'm sure you'll find it).

This brings up an editor where you can select where which file should go. You can either add the shortcut to the predefined "Start Menu" folder, which you can add to the folder tree by right-clicking, or you can manually add Windows/Startup by creating new folders in the folder tree.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top