Reputation: 2208
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 administrator?
Upvotes: 0
Views: 705
Reputation: 101606
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.
Upvotes: 2