问题描述
在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:
{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:
推荐答案
我想到的解决方法是使用外部脚本执行数据复制,并使用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安装程序将文件安装到原始用户的“我的文档"文件夹中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!