简体   繁体   English

如何使InnoSetup删除除当前用户以外的所有人的文件夹权限?

[英]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.

相关问题 如何在InnoSetup中将.NET程序集添加到GAC? - How do I add a .NET assembly to the GAC in InnoSetup? 如何更改InnoSetup中的安装目标文件夹权限? - How to change install destination folder permisions in InnoSetup? 如何在InstallAnywhere安装过程中删除InnoSetup安装? - How to remove InnoSetup Installation on InstallAnywhere Install Process? 如何检测是否正在InnoSetup脚本中安装在终端服务器上? - How do I detect whether I'm installing on a Terminal Server in an InnoSetup script? 如何摆脱烦人的InnoSetup文件夹选择机制? - How to get rid of annoying InnoSetup folder selection mechanism? 如何让 PackageMaker 以正确的权限创建有效负载的包含文件夹 - How do I get PackageMaker to create the payload's containing folder with correct permissions 如何根据InnoSetup中的用户选择遵循不同的路径? - How to follow different paths depending on user choices in InnoSetup? 使用innosetup在开始菜单中创建快捷方式 - Make shortcut in start menu with innosetup InnoSetup - 如何要求用户键入许可证密钥或产品密钥并将该代码与编译常量匹配? - InnoSetup - how to ask user to type license key or product key and match that code with compiled constant? 永久自定义文件夹图标与InnoSetup在任何计算机中 - Permanent customized folder icons with InnoSetup in any computer
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM