简体   繁体   English

安装升级后,InstallShield Basic MSI Project安装程序会丢失“登录身份”

[英]InstallShield Basic MSI Project installer loses “Log On As” after installing upgrade

I am writing an InstallShield Basic MSI Project installer to upgrade a Windows Service. 我正在编写InstallShield Basic MSI Project安装程序以升级Windows服务。

When I upgrade the service I do the following: 升级服务时,请执行以下操作:

  1. Note that the service "Log On As" user is a Windows domain user account: TESTDOMAIN\\ZamAdmin. 请注意,服务“登录身份”用户是Windows域用户帐户:TESTDOMAIN \\ ZamAdmin。
  2. Stop the service in the Services Window. 在服务窗口中停止该服务。
  3. Install the upgrade. 安装升级。
  4. Refresh the Services Window. 刷新服务窗口。

Once the service is installed the "Log On As" user gets changed to: LocalSystem. 安装该服务后,“登录身份”用户将更改为:LocalSystem。

The service is written in C# using System.ServiceProcess.ServiceBase. 该服务使用System.ServiceProcess.ServiceBase用C#编写。
The installer is using InstallShield 2008 Premier Edition version 14. 安装程序正在使用InstallShield 2008 Premier Edition版本14。

I did find this stackoverflow case but I'd rather not convert to a InstallScript project. 我确实发现了这种stackoverflow的情况,但是我不想转换为InstallScript项目。

Is there anyway I can keep the previous "Log On As" user when upgrading a Windows service? 无论如何,升级Windows服务时是否可以保留以前的“登录身份”用户?

a few options 一些选择

  1. You could create a system search to save all those reg keys, that's messy though, especially if the machine has created LEGACY keys, changing those keys might still make it fail. 您可以创建一个系统搜索来保存所有这些reg键,但这很麻烦,特别是如果机器已创建LEGACY键,则更改这些键仍可能使它失败。

  2. You could ask for the username/password and recreate they key. 您可以要求输入用户名/密码并重新创建密钥。

  3. You could create a custom action to do a regedit /se HKLM\\System\\CurrentControlSet\\Services\\service_name then import that key. 您可以创建一个自定义操作以执行regedit /se HKLM\\System\\CurrentControlSet\\Services\\service_name然后导入该密钥。 Again, you could run into issues, windows tends not to like it sometimes when you change the reg keys for users/pass. 同样,您可能会遇到问题,有时当您更改用户/密码的注册表项时,Windows有时不喜欢它。

I would do 2 personally, but the other options might work too. 我个人会做2个,但其他选项也可能起作用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 安装后多个Project MSI安装程序未运行 - Multiple Project MSI Installer not running after install 在安装程序项目中的安装之前添加安装MSI的自定义操作 - Add custom action of installing msi before the setup in installer project 使用MSI安装程序升级服务 - upgrade a service using MSI installer 运行InstallShield安装程序后未安装应用程序 - Application not installed after running InstallShield installer 在客户端PC上安装Windows Installer软件包(.msi)的要求 - Requirements for installing Windows Installer Package (.msi) on Client Pc WiX 安装程序 msi 未安装使用 Visual Studio 2017 创建的 Winform 应用程序 - WiX installer msi not installing the Winform app created with Visual Studio 2017 如何在使用VS MSI Installer进行安装之前备份Web.config - How to backup a Web.config before Installing with VS MSI Installer 在Installshield中添加MSI的先决条件 - Adding prerequisite for msi in Installshield 从自定义安装程序安装后,c#窗口服务未获取log4net设置 - c# window service not picking up log4net settings after installing from custom installer Visual Studio 安装项目:在没有管理员权限的情况下运行 msi 安装程序 - Visual Studio Setup Project: Run the msi installer without administrator rights
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM