/build/static/layout/Breadcrumb_cap_w.png

Install fails in unattended mode only

This is an odd one and it has me stumped.
I created my own MSI that installs one .exe under Program Files and configures some Win7 service startup values via HKLM\SYSTEM\CurrentControlSet\services\[ServiceName]\Start. The component that the registry keys are in is set to leave the keys on uninstall so it doesn't break the services. It works exactly as planned, until I run the MSI with any silent switch (i.e /qr, /qb, /qn).

When install with a silent switch, I get
Error 1406. Could not write value Start to key \SYSTEM\CurrentControlSet\Services\[ServiceName]. Verify that you have sufficient access to that key, or contact your support personnel.

I can select Ignore for the error and I find that the error only occurs on SOME of the registry keys I'm writing. If I use the exact same shortcut to launch the install, but remove the /q_ and do an attended install keeping all defaults, the install completes successfully without error.

Any ideas?

0 Comments   [ + ] Show comments

Answers (7)

Posted by: Rheuvel 13 years ago
Brown Belt
0
Hi,

Have you already tried to handle the service through the ServiceControl table? The table is designed for that purpose, so maybe give that a try instead.

http://msdn.microsoft.com/en-us/library/aa371634(VS.85).aspx
Posted by: VikingLoki 13 years ago
Second Degree Brown Belt
0
I'm editing a few service's reg keys to set their startup type to either Manual/Automatic/Disabled. I'm already using the ServiceControl table to stop the services I'm disabling and to insure services I'm enabling are started.

AFAIK, the ServiceControl table won't adjust an existing service's startup type. It can set it for a new service it installs, but not a pre-existing service. That's why I'm plugging in the Start reg key, set to remain persistant upon uninstall. (Unless I'm wrong on that...)
Posted by: Rheuvel 13 years ago
Brown Belt
0
OK, I don't use that table too often myself. MSDN however says:
Name
This column is the string naming the service. This column can be used to control a service that is not installed.


So if you know the name of the service you can actually control it even if you're not installing the service. That's what I make of it. If I remember correctly though, tools like Wise don't show any available services unless they are listed in the ServiceInstall and it has to be done manually in the table.

However, that's not what this topic is about....


Another question: Are you stopping the service in question before trying to change the key? It might cause a possible access problem when the service is currently running. So however you do it, by ServiceControl or CA's... The service has to be stopped before the MSI writes to the registry and start the service again after.
Posted by: VikingLoki 13 years ago
Second Degree Brown Belt
0
That's the strange thing. The first service getting the error is set to manual and not running. Other service startup types were updated before the error occurred. It also works fine on an interactive install, only fails on unattended. It must have something to do with the context that an interactive install runs in vs an unattended install. But why some services can be updated (both running and stopped) and some cannot (which aren't running) is not making sense to me.
Posted by: anonymous_9363 13 years ago
Red Belt
0
How are the registry values being written, via the Registry table or via Custom Action(s)? If the latter, in which sequence are they scheduled, Immediate or Deferred?
Posted by: VikingLoki 13 years ago
Second Degree Brown Belt
0
They're being written by the Registry Table.
Posted by: anonymous_9363 13 years ago
Red Belt
0
Hmmm...that is strange. Time to roll out ProcMon, methinks. I can't see any other way that you're going to find out what's happening.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ