The Windows Installer Service could not be accessed.

Alan Sinclair 2's picture

On Vista SP1, and only on some machines, my install goes fine but a repair (started from the Control Panel Programs and Features applet) fails with the message:

"The Windows Installer Service could not be accessed. This can occur if the Windows Installer is not correctly installed. Contact your support personnel for assistance."



After the repair fails, the next repair (same package) succeeds.



How do I determine what's triggering "Installer Service could not be accessed"? There is no actual problem with the service as far as I can tell -- it's showing in Services.msc as running, and can be stopped and started fine. Pre-SP1 Vista and other OSes all repair normally, as do some Vista SP1 boxes. Web searches find a lot of complaints about the "could not be accessed" message but I haven't found any helpful.





The failing repair log shows (timestamps removed so logs could be diff'd):

=== Logging started: 3/13/2009 17:03:00 ===

PROPERTY CHANGE: Adding Preselected property. Its value is '1'.

PROPERTY CHANGE: Adding ACTION property. Its value is 'INSTALL'.

Doing action: INSTALL



The failing log stops in the middle of copying files. Just stops logging, that is, then says

MainEngineThread is returning 1601





The successful repair log shows:

=== Logging started: 3/13/2009 17:30:51 ===

Checking in-progress install: install for same configuration.

Suspended install detected. Resuming.

PROPERTY CHANGE: {snip}

... many more properties

PROPERTY CHANGE: Adding RESUME...

PROPERTY CHANGE: Adding Resume...

PROPERTY CHANGE: Adding UpdateStarted...

PROPERTY CHANGE: Adding Preselected...

Doing action: INSTALL



This log of the successful repair ends normally, with list of properties, then MainEngineThread returning 0, etc.



Have a great weekend everyone!

EdT's picture

There are a couple of reasons that might cause this. Check that your antivirus solution is not blocking some aspect of the install - especially custom actions which are often a cause of errors in the Vista environment. Check also (via task manager) to see if the msiexec process is not already doing something else.

When you try to trigger a repair, are you running with elevated rights?

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

Alan Sinclair 2's picture

Thanks for the ideas. I've checked and there's no antivirus on the failing machines. Msiexec isn't running prior to the repair. I'm logged in as Administrator (that's how our QA set up their machines) and starting the repair from the right-click menu in Control Panel "Programs & Features" and the log shows "Running product with elevated privileges."



I've found:



(1) the failed repair can be completed by running "Repair" a second time. This is consistent - one repair fails then the next "resumes" (according to the log) and completes. The log from a failed repair doesn't show anything special but stops at FileCopy action for CitrixAccelerator.exe (the resumed log is complete.)



(2) the problem seems to be a crash in the Windows Installer service (msiexec). The System Event Log shows: "The Windows Installer service terminated unexpectedly."



(3) the repair succeeds (i.e. first time through completes) after these steps:

- (a) stop the GUI (a monitor in the system tray)

- (b) net stop accelerator

- (c) net stop wandrivr

- (d) delete the file accelerator.exe



It feels like a permissions problem that's killing msiexec somehow - how can I finger it? It's new with Vista SP1.

EdT's picture

If there was a permissions problem with msiexec, then all installs would barf. Have you had a look on the Citrix website in case this is a known issue with their code?

Have you tried running procmon during the repair to see what is going on under the covers?

Have you had a look in the application event log to see what sequence of events is taking place?

Try comparing event log entries and other test results with a system where the repair activity is successful.



By the way - on Vista, being logged in as Administrator does not automatically elevate your rights if UAC is turned on. You could try the same sequence with UAC turned off, and see if that changes anything.

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

Alan Sinclair 2's picture

Just updating this with

Just updating this with current status. I think the problem is a broken Windows: the offending machines refuse to repair or update Windows Installer.

The problem only occurs on a couple of machines, can't reproduce it elsewhere. It's slow going because I only get access to those machines for about an hour per week, so each idea gets tried, fails, then there's another delay.

AngelD's picture

Crash dump?

(2) the problem seems to be a crash in the Windows Installer service (msiexec). The System Event Log shows: "The Windows Installer service terminated unexpectedly."
If you enable crash dumps to be generated will there be one when this happens?