0
votes

When uninstalling the application from the admin user only the process related to this particular user is cleaning in NSIS. Other instance of the process is not killing.

Steps followed:

Installed the application from the admin user and then logged in as normal user. So for each user I am seeing one process (This is the expected behavior)

When switched back to the admin user and uninstalling the application, able to kill only the process for the admin user. And the normal user process is still showing.

Is there any way to kill all the processes related to the application irrespective of the user specific?

I am using the below code snippet:

Section "Uninstall"

${nsProcess::FindProcess} "sysnotification.exe" $R0

MessageBox MB_OK "nsProcess::FindProcess$\n$\n\
            Errorlevel: [$R0]"
${if} $R0 == 0
BringToFront
${nsProcess::KillProcess} "sysnotification.exe" $R0
MessageBox MB_OK "KillProcDLL::KillProc$\n$\n\
                    Errorlevel: [$R0]"
${EndIf}

${nsProcess::Unload}

SectionEnd
1
Do not vandalize your posts. By posting on this site, you've irrevocably granted the Stack Exchange network the right to distribute that content under the CC BY-SA 4.0 license for as long as it sees fit to do so. For alternatives to deletion, see: I've thought better of my question; can I delete it? - Sabito 錆兎

1 Answers

1
votes

Administrators can find and kill processes running as other users. This is noted on the plug-ins wiki page:

Finds processes of other user(s) when running 'as Administrator' or when having switched to another user

Edit:

It turns out that the plug-in does not request debug privileges and therefore fails to kill processes running as other users.

You can try to contact the author and ask them to add this feature. In the meantime I would recommend that you use the LockedList plug-in instead.