开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜