通过Windows Vista/7上的Inno安装程序将文件安装到原始用户的“我的文档"文件夹中 [英] Install files to original user's My Docs folder via Inno Setup on Windows Vista/7

查看:121
本文介绍了通过Windows Vista/7上的Inno安装程序将文件安装到原始用户的“我的文档"文件夹中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Inno Setup脚本的[Run]部分中,有一个标志runasoriginaluser,该标志允许脚本以原始用户身份运行进程:

In the [Run] section of an Inno Setup script, there's a flag runasoriginaluser that allows the script to run a process as the original user:

生成的进程将执行 (通常不高架) 启动用户的凭证 初始设置(即"UAC之前的版本 对话框"凭据.

the spawned process will execute with the (normally non-elevated) credentials of the user that started Setup initially (i.e., the "pre-UAC dialog" credentials).

{userdocs} shell文件夹常量是否具有等效的标志或解决方法?

Is there an equivalent flag or workaround for the {userdocs} shell folder constant?

这显然是Inno Setup(通常是其他安装程序)中的已知限制,但我希望有人知道解决方法.

This is apparently a known limitation within Inno Setup (and other installers, generally), but I'm hoping someone knows a workaround.

摘录自Inno Setup帮助文件:

Excerpt from the Inno Setup help file:

用户"常量是指 运行安装程序的用户的配置文件. 该用户通常与 当前登录的用户,因此请使用 用户"常量要小心.

The "user" constants refer to the profile of the user running Setup. This user is often not the same as the currently logged-in user, so use the "user" constants with caution.

推荐答案

我想到的解决方法是使用外部脚本执行数据复制,并使用wpReady页面中的ExecAsOriginalUser函数调用脚本. NextButtonClick事件功能.

The workaround I came up with was using an external script to perform the data copy and calling the script using the ExecAsOriginalUser function in the wpReady page of the NextButtonClick event function.

如果有人感兴趣,我会提供更多详细信息.

I'll provide more details if anyone is interested.

这篇关于通过Windows Vista/7上的Inno安装程序将文件安装到原始用户的“我的文档"文件夹中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆