Ping... Appreciate all suggestions and pointers. On Wed, Feb 8, 2012 at 11:08 AM, Sameer Arora <arora...@gmail.com> wrote:
> Hi, > > I have a WiX 3.5 project that installs and starts a windows service and > thereafter executes a custom action to configure the service using command > line utility sc.exe that ships with the OS. > > This MSI can be used both for fresh install or major upgrade. > It uses custom dialogs to capture user information in global properties > (which can be passed from command line as well). > > For a fresh install, the MSI installation succeeds whether run in normal > or quiet mode (UI enabled/suppressed). > However, for a major upgrade, installation succeeds only in normal mode, > but fails in quiet mode with sc.exe failing to find the installed service > (error details below). > > My initial hunch was that with UI enabled, there is sufficient time lag > between execution of service installation and configuring steps so that > sc.exe succeeds in finding the service installed. > In quiet mode OTOH, the steps may get executed too quickly for sc.exe to > find the service installed and hence the failure. > > To test this, I tweaked the InstallExecuteSequence to increase the > "distance" between StartServices and the custom action (even introduced a > sleep in an intermediate custom action), but to no avail. > I also looked into the InstallUISequence but couldn't see anything that > might impact service installation or config steps. > > Any thoughts what could be the cause/remedy? > Appreciate all pointers. > > Sameer > > OS is Win7, but not sure if OS is a factor here. > > --- Error from installation log: Begin---- > ... > MSI (s) (A0:0C) [08:50:40:235]: Executing op: > CustomActionSchedule(Action=QtExecDeferred,ActionType=3073,Source=BinaryData,Target=CAQuietExec,CustomActionData="C:\Windows\SysWOW64\sc.exe" > sidtype "<service name>" "unrestricted") > MSI (s) (A0:7C) [08:50:40:278]: Invoking remote custom action. DLL: > C:\Windows\Installer\MSIB16A.tmp, Entrypoint: CAQuietExec > MSI (s) (A0:C0) [08:50:40:278]: Generating random cookie. > MSI (s) (A0:C0) [08:50:40:283]: Created Custom Action Server with PID 7120 > (0x1BD0). > MSI (s) (A0:A8) [08:50:40:320]: Running as a service. > MSI (s) (A0:A8) [08:50:40:322]: Hello, I'm your 32bit Elevated custom > action server. > CAQuietExec: OpenService FAILED 1060: > CAQuietExec: > CAQuietExec: The specified service does not exist as an installed service. > CAQuietExec: > CAQuietExec: Error 0x80070424: Command line returned an error. > CAQuietExec: Error 0x80070424: CAQuietExec Failed > CustomAction QtExecDeferred returned actual error code 1603 (note this may > not be 100% accurate if translation happened inside sandbox) > ... > --- Error from installation log: End---- > > > ---- WiX Code snippets: Begin ---- > > <!--Custom Action definition--> > <CustomAction Id="SetServiceSidToUnrestricted_CmdLine" > Property="QtExecDeferred" Value='"[SystemFolder]sc.exe" sidtype > "$(var.agentHostServiceName)" "$(var.agentServiceSidType)"' /> > <CustomAction Id="QtExecDeferred" BinaryKey="WixCA" > DllEntry="CAQuietExec" Execute="deferred" Return="check" Impersonate="no"/> > ... > > <!-- InstallExecuteSequence--> > ... > <InstallInitialize Sequence=n /> > ... > <InstallServices Sequence=x>VersionNT</InstallServices> > <StartServices Sequence=x+1>VersionNT</StartServices> > > <!--Run this custom action on install/upgrade/repair, do not run only > on an uninstall --> > <Custom Action="QtExecDeferred" After="StartServices"> > <![CDATA[ > NOT ((REMOVE~="ALL") AND (NOT UPGRADINGPRODUCTCODE)) > ]]> > </Custom> > > .... > > <InstiallFinalize/> > > ---- WiX Code snippets: End---- > ------------------------------------------------------------------------------ Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users