Skip to content

Uninstall: Shutdown running application #186

@peters

Description

@peters

The uninstaller should send a window message to the program you are attempting to uinstall, telling it to shutdown. This would solve a couple of edge cases where you mark certain files as DELETE_ON_REBOOT. These are pretty niché scenarios, but you are bound to have some clients trying to uninstall / install an application (without rebooting).

This is mainly related to #181

Appearently this can be achieved rather easily with Shimmer sending a window message (hey no IPC) to the target application:

ds.dwData = WM_USER + 50; // the "message" you want to send
cds.cbData = sizeof(MyDataForMessage50); // the size of the chunk of data
cds.lpData = lpMessage50Data; // a pointer to the chunk of data
SendMessage(hwndTarget, WM_COPYDATA, reinterpret_cast<WPARAM>(hwndSender),
            reinterpret_cast<LPARAM>(&cds));

See sending-a-custom-windows-message-custom-data-marshalling

Then you could just override a virtual method in AppSetup that allows the application to perform a clean shutdown (not referring to OnUninstall).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions