本文介绍了复制到Windows Vista / 7下的程序文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我写了一个向导在C + +安装一些文件到Windows下的程序文件文件夹。据我所知,我需要管理员权限写入Vista / 7下的程序文件。所以我的问题是:是否有一种方法来打开管理员权限,而应用程序分别只运行一个向导页面?或者,我必须为此向导页面启动具有管理员权限的另一个进程吗?

解决方案

通常,你有一个盾牌徽标的按钮,然后外壳到另一个进程,

但是真的,这听起来像是在写一个安装程序,所以你应该使用为那样的设计像WiX。



See also 和此


I have written a wizard in C++ which installs some files to the program files folder under windows. As I understand, I need Admin rights to write to program files under Vista/7. So my question is: Is there a way to turn on Admin rights while the application is running respectively only for one wizard page? Or do I have to start another process with Admin rights for this one wizard page?

解决方案

Typically you have a shield logo'd button and then shell out to another process whose manifest requests elevation.

But really it sounds like you're writing an installer so you should use something designed for that like WiX.

See also this similar question and this cited article from one of the answers thereof

这篇关于复制到Windows Vista / 7下的程序文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-28 18:25