开发者

Prevent starting with administrative rights

Goal:

It sounds a little bit odd, but I have to prevent that a software starts with administrative rights.

Problem:

I have a setup tool that installs the software very well. After completion the setup starts the software itself. Because the setup tool runs with administrative 开发者_开发问答rights, the software that will be startet automatically after the setup does the same.

But all Settings that the program need, won't be written/read correctly that time, because due to the UAC virtualization, the config directory is different to the config directory the user would have without administrative rights.

Question:

Is there any way to downgrade from admnistrative rights to user rights, if the parent process owns administrative rights. App.config? StartParameter? or something else

Info: I'm using the INNOSETUP to build the setup tool.

Thx for your help


Just set runasoriginaluser flag for running application.


Yes, you can start a process non-elevated, however I'm not sure how this integrates with InnoSetup. The instructions are How do I start a program as the desktop user from an elevated app.

Consider marking your application with appropriate manifest to suppress UAC virtualization, it will then use the same directories in both cases: non-elevated and elevated. And better use directories in user's profile without relying on virtualization.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜