简体   繁体   English

Inno Setup:如何在安装程序中集成管理员凭据

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

相关问题 Inno安装程序安装程序在Windows 7中不起作用 - Inno Setup Installer Not Working in Windows 7 如何禁用 Inno Setup 安装程序 GUI 上的导航键? - How to disable the navigation keys on Inno Setup installer GUI? 如何在 Inno Setup 安装程序后运行 PowerShell 脚本 - How to run a PowerShell Script after Inno Setup installer Inno Setup 的安装程序在上传和下载周期后不需要管理员权限 - Inno Setup's installer doesn't require admin rights after uploading and downloading cycle 如何在Inno Setup中强制用户安装具有管理员权限的应用程序? - How to enforce users to install application with admin permissions in Inno Setup? 在Inno Setup安装中运行另一个安装程序 - Run another installer in an Inno Setup installation 为MSI文件构建Inno Setup安装程序 - Building Inno Setup installer for MSI files Microsoft SmartScreen - 使用 Inno Setup 安装程序暂停? - Microsoft SmartScreen - suspended using Inno Setup installer? 如何从注册表中获取Office的安装目录以安装Inno Setup安装程序 - How to take the Office's install directory from registry for an Inno Setup installer Inno Setup 生产的安装程序需要提升。 我该如何避免? - Installer produced by Inno Setup requires elevation. How do I avoid that?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM