-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kill processes belonging to us on install and uninstall #590
Conversation
var pbi = new PROCESS_BASIC_INFORMATION(); | ||
|
||
//Get a handle to our own process | ||
IntPtr hProc = OpenProcess((ProcessAccess)0x001F0FFF, false, Process.GetCurrentProcess().Id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you use the enum here instead of the literal?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just moved code from long ago, but yeah, probably - this is calling undocumented methods so it might not be possible
Could maybe beef up the tests around this scenario, although there's no way to mock them. |
Kill processes belonging to us on install and uninstall
@paulcbetts so this #358 is not necesary anymore? |
@ricardopolo Nope! |
For certain types of apps, it's super easy to run the installer while the app is still running. This of course fails, but users think it is just because the installer has a bug. Enact Process Violence to stop this from occurring