[英]Inno Setup : how to integrate admin credentials in the installer
I want to create an installer that: - install a software package - copy a host file in the user system without any user installation except launching the installer.我想创建一个安装程序: - 安装一个软件包 - 在用户系统中复制一个主机文件,除了启动安装程序外,没有任何用户安装。
I need this installer to run as admin but I do not want to disclose the admin login/password to users but instead I want to embed it in the installer itself.我需要此安装程序以管理员身份运行,但我不想向用户透露管理员登录名/密码,而是想将其嵌入安装程序本身。 How can I insert the admin credentials within the installers, please ?
请问如何在安装程序中插入管理员凭据? Is it even possible ?
甚至有可能吗?
I've looked into the forums but did not find what I'm trying to do.我查看了论坛,但没有找到我想要做的事情。
Thank you for your help and support, Fred感谢您的帮助和支持,弗雷德
You basically need this:你基本上需要这个:
Make Inno Setup installer request privileges elevation only when needed仅在需要时使 Inno Setup 安装程序请求权限提升
(the old code in the second part of my answer with an explicit code for the elevation for Inno Setup 5) (我的答案第二部分中的旧代码带有 Inno Setup 5 提升的显式代码)
Except that instead of simply re-running the installer with runas
verb (which needs entering the Administrator credentials manually), you need this:除了简单地使用
runas
动词(需要手动输入管理员凭据)重新运行安装程序之外,您需要:
Inno Setup run/execute code as another user Inno Setup 以另一个用户身份运行/执行代码
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.