Hi, i've having problems trying to get nsSCM to uninstall some of my installed services under Vista SP1. Using the UAC plug-in didn't help either. I've tried research ad tweaking the code for several days, but to no avail.
Code:
RequestExecutionLevel admin
Function un.onInit
UAC::RunElevated
FunctionEnd
Section Uninstall
UAC::RunElevated
..................
# Remove abc service
nsSCM::Remove /NOUNLOAD "abc"
Pop $0 ; return error/success
-> I'm logging in as Vista Admin, but service abc does not uninstall. The uninstaller removes folders and shortcuts successfully though.
The weird thing is that nsSCM worked for the installer section. For some reasons, i feel that Vista seems to give NSIS uninstallers lower rights than the installer?
Appreciate any tip. 🙂
nsSCM fails to run in uninstaller under Vista
4 posts
RequestExecutionLevel admin should be enough, don't use the uac plugin
Thanks Anders, yes UAC is not required. I found out that the culprit is /NOUNLOAD. for reasons i don't know, if i add "nsSCM::Stop /NOUNLOAD "abc"" before "nsSCM::Remove /NOUNLOAD "abc"", and if the service is not started in the first place, Remove will fail??
could be a bug in the nsSCM plugin, maybe it can't handle staying loaded