[英]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: 升级服务时,请执行以下操作:
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 一些选择
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键,则更改这些键仍可能使它失败。
You could ask for the username/password and recreate they key. 您可以要求输入用户名/密码并重新创建密钥。
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.