[英]How do I make InnoSetup remove permissions on a folder for everyone but the current user?
I have an "Install Just for me" option on my InnoSetup installer. 我的InnoSetup安装程序上有一个“只为我安装”选项。 If this option is chosen the program files are written to a folder off the users local settings application data folder, rather than C:\\Program Files
. 如果选择此选项,则将程序文件写入用户本地设置应用程序数据文件夹之外的文件夹,而不是C:\\Program Files
。
It seems that other admin users can still poke around and find this folder and therefore execute the app, which I want to avoid if the user is installing "just for me". 看来其他管理员用户仍然可以四处查找并找到此文件夹,从而执行该应用程序,如果用户正在安装“仅对我而言”,我想避免该操作。
How do I specify that this folder (nominally {userappdata}\\MyApp\\Program Files\\
) has permissions removed for everyone except the user running the installer? 如何指定此文件夹(名义上为{userappdata}\\MyApp\\Program Files\\
)对除运行安装程序的用户以外的所有用户都具有权限?
You can use cacls.exe
or use the various permission directives . 您可以使用cacls.exe
或使用各种权限指令 。 But no matter what you do, an administrators can always give themselves permission to access the file. 但是,无论您做什么,管理员都可以始终授予自己访问文件的权限。 They are administrators after all... 他们毕竟是管理员...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.