Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Update of an NT service executable


7 replies to this topic

mstone

mstone
  • Members
  • 20 posts

Posted 11 August 2004 - 10:11

The product I'm creating an MSI installation package for contains NT services. The services are installed to run from LocalSystem account but the accounts may be changed after the installation. The problem is that the upgrade (installing the new product version on top of the old one) doesn't work because (as I can see from the log) the MSI fails to reinstall the services for which the account was changed. I don't understand why it happens because the only thing MSI has to do is to replace the executable and it doesn't need any credentials for the account the service is currently running from. Is it possible to solve the problem without completely rewriting in custom actions the MSI's mechanism for NT services installation/uninstallation?

P.S. Of course, all the NT services in question are stopped before performing upgrade.

Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 11 August 2004 - 10:33

I would try to add Full Control for the LocalSystem account to the folder and files where the service resides. Maybe use the LockPermission table.
Regards
-Stein Åsmul

mstone

mstone
  • Members
  • 20 posts

Posted 11 August 2004 - 10:41

QUOTE (Glytzhkof @ 2004-08-11 09:33)
I would try to add Full Control for the LocalSystem account to the folder and files where the service resides.

I see what you mean, but the problems is not with the permissions of the executable file itself, but because the service's account on the target system differs from the one in the installation package.

Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 11 August 2004 - 11:51

Your setup process may be run with the LocalSystem account and hence not be allowed to replace the file. Adding full control explicitly may resolve the problem.
Regards
-Stein Åsmul

mstone

mstone
  • Members
  • 20 posts

Posted 11 August 2004 - 11:58

QUOTE (Glytzhkof @ 2004-08-11 10:51)
Your setup process may be run with the LocalSystem account and hence not be allowed to replace the file.

But in this case uninstall would have failed as well because it implies file removal. However, it is only update that fails.

Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 13 August 2004 - 09:29

In case uninstall works you should be able to use a major upgrade that essentially does an uninstall and then a reinstall. Since the service has been already removed you should then be able to install the new file?

Edited by Glytzhkof, 13 August 2004 - 09:30.

Regards
-Stein Åsmul

mstone

mstone
  • Members
  • 20 posts

Posted 19 August 2004 - 08:55

QUOTE (Glytzhkof @ 2004-08-13 08:29)
In case uninstall works you should be able to use a major upgrade that essentially does an uninstall and then a reinstall.

I haven't tested it wih major upgrade yet, but anyway it would be nice to to be able to patch the NT service executables even with small/minor upgrades. My plans are to try and play with conditions and custom actions. I'll report in this thread if there's any success.

Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 19 August 2004 - 14:17

If you try a major upgrade it is probably best to put the RemoveExistingProducts early in the execute sequence. Consult the SDK for a description of recommended locations for this action.
Regards
-Stein Åsmul