2
votes

I am writing an InstallShield Basic MSI Project installer to upgrade a Windows Service.

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.
  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.

The service is written in C# using System.ServiceProcess.ServiceBase.
The installer is using InstallShield 2008 Premier Edition version 14.

I did find this stackoverflow case but I'd rather not convert to a InstallScript project.

Is there anyway I can keep the previous "Log On As" user when upgrading a Windows service?

1

1 Answers

1
votes

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.

  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. Again, you could run into issues, windows tends not to like it sometimes when you change the reg keys for users/pass.

I would do 2 personally, but the other options might work too.