NSIS, run one action as administator
I have an installation that require only user privilegies, but this installation should remove previous files or call uninstaller if it exists
Is there way in NSIS to run one action(DeleteFile, RunExe) as admin开发者_开发知识库istrator?
Elevation is per process and you cannot go back down once you have elevated.
You should create a little helper nsis app that performs your required actions (RequestExecutionLevel admin alone is not enough, you also need to use UserInfo::GetAccountType) Use ShellExecute with the runas verb to start a elevated process.
精彩评论