Remove yourself while working

I am currently creating a removal application that deletes the application folder. The problem is that I cannot uninstall the uninstall application located in the same folder as its launch. Is there a way to uninstall the application while running, so its just in memory.

        string Installation = UninstallRegister.Read("InstallationLocation");
        if (Directory.Exists(StartMenu))
        {
            Directory.Delete(StartMenu, true);
        }

Regards

+3
source share
2 answers

A simple idea would be to copy the uninstall application to% TEMP% and run from there. This, however, will leave the file at% TEMP% (which probably won't be noticed by anyone).

+5
source

You can use the command Del command

nircmd cmdwait ,

0

All Articles