Re: [WiX-users] unable to start a service through MSI

2012-02-02 Thread Rob Hamflett
On 02/02/2012 01:15, Rajesh Khetan wrote:
 Thanks Phil. Is there a way to ensure in WXS file, such that the service gets 
 started  after all the dependent dlls are installed?
You could add a commit custom action to start the service.  This will 
run once the install has been finalised, so the everything should be 
good to go at this point.

Rob


--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


[WiX-users] unable to start a service through MSI

2012-02-01 Thread Rajesh Khetan
Hi,

I am currently trying to get my service started as a part of MSI install and am 
unable to do so.  In the event viewer, I see the following error:

Product: Myservice Cache Service -- Error 1920. Service ' Myservice ' 
(Myservice) failed to start.  Verify that you have sufficient privileges to 
start system services.

However, I am logged in as admin. Also, if I simply install the service and 
start the service manually, I am able to do that.  I appreciate any input to 
help me figure out what I might be doing wrong or missing.

One additional data about my service is: I am trying to install the service 
under account NT AUTHORITY\NETWORK SERVICE (Property SERVICEACCOUNT = 'NT 
AUTHORITY\NETWORK SERVICE' below)

Thanks a lot for your help.
Rajesh
PS: Here is a snippet from my WXS file:

Directory Id='TARGETDIR' Name='SourceDir'
Component Id=' MyserviceCacheComponent' Guid='my guid'

!-- The files to be installed --
File Id='Myservice.exe' Name='Myservice.exe' DiskId='1' 
Source='$(var.INETROOT)\target\$(var.BUILDTYPE)\$(var.BUILDTARGET)\Myservice.exe'
 /
File Id='Myservice.pdb' Name='Myservice.pdb' DiskId='1' 
Source='$(var.INETROOT)\target\$(var.BUILDTYPE)\$(var.BUILDTARGET)\Myservice.pdb'
 /

File Id='MyservicePf.dll' Name='MyservicePf.dll' 
SelfRegCost='1' DiskId='1' 
Source='$(var.INETROOT)\target\$(var.BUILDTYPE)\$(var.BUILDTARGET)\MyservicePf.dll'
 /
File Id='MyservicePf.pdb' Name='MyservicePf.pdb' DiskId='1' 
Source='$(var.INETROOT)\target\$(var.BUILDTYPE)\$(var.BUILDTARGET)\MyservicePf.pdb'
 /

RemoveFile Id='REM_MYSERVICE_XML' 
Name='Myservice_Cache_Service.xml' On='uninstall'/

ServiceControl Id='Myservice_Cache_Service' Name='Myservice' 
Start='install' Stop='both' Remove='both' Wait='no'/
ServiceInstall Id='Myservice_Cache_Service' Name='Myservice'

DisplayName='Myservice'

Type='ownProcess'
Start='auto'

ErrorControl='normal'

Account='[SERVICEACCOUNT]'

Description='Myservice Cache Service'/
...
/Component
/Directory
--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] unable to start a service through MSI

2012-02-01 Thread Michael Osmond
The error message is pretty generic, the service can't start for almost any 
reason.

We have MSIs that run in full dialog mode so there is a dialog popped when the 
service fails to start with the error you are seeing in the eventlog, with a 
retry and cancel options.  
When you get this dialog go to the Services control panel and manual start the 
service, you will often get a more meaningful error.

If you don't get the dialog with the error, change your MSI so it does not try 
start the service, and debug the startup when the install is finished

Michael

-Original Message-
From: Rajesh Khetan [mailto:rajesh.khe...@microsoft.com] 
Sent: Thursday, 2 February 2012 10:29 AM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] unable to start a service through MSI

Hi,

I am currently trying to get my service started as a part of MSI install and am 
unable to do so.  In the event viewer, I see the following error:

Product: Myservice Cache Service -- Error 1920. Service ' Myservice ' 
(Myservice) failed to start.  Verify that you have sufficient privileges to 
start system services.

However, I am logged in as admin. Also, if I simply install the service and 
start the service manually, I am able to do that.  I appreciate any input to 
help me figure out what I might be doing wrong or missing.

One additional data about my service is: I am trying to install the service 
under account NT AUTHORITY\NETWORK SERVICE (Property SERVICEACCOUNT = 'NT 
AUTHORITY\NETWORK SERVICE' below)

Thanks a lot for your help.
Rajesh
PS: Here is a snippet from my WXS file:

Directory Id='TARGETDIR' Name='SourceDir'
Component Id=' MyserviceCacheComponent' Guid='my guid'

!-- The files to be installed --
File Id='Myservice.exe' Name='Myservice.exe' DiskId='1' 
Source='$(var.INETROOT)\target\$(var.BUILDTYPE)\$(var.BUILDTARGET)\Myservice.exe'
 /
File Id='Myservice.pdb' Name='Myservice.pdb' DiskId='1' 
Source='$(var.INETROOT)\target\$(var.BUILDTYPE)\$(var.BUILDTARGET)\Myservice.pdb'
 /

File Id='MyservicePf.dll' Name='MyservicePf.dll' 
SelfRegCost='1' DiskId='1' 
Source='$(var.INETROOT)\target\$(var.BUILDTYPE)\$(var.BUILDTARGET)\MyservicePf.dll'
 /
File Id='MyservicePf.pdb' Name='MyservicePf.pdb' DiskId='1' 
Source='$(var.INETROOT)\target\$(var.BUILDTYPE)\$(var.BUILDTARGET)\MyservicePf.pdb'
 /

RemoveFile Id='REM_MYSERVICE_XML' 
Name='Myservice_Cache_Service.xml' On='uninstall'/

ServiceControl Id='Myservice_Cache_Service' Name='Myservice' 
Start='install' Stop='both' Remove='both' Wait='no'/
ServiceInstall Id='Myservice_Cache_Service' Name='Myservice'

DisplayName='Myservice'

Type='ownProcess'
Start='auto'

ErrorControl='normal'

Account='[SERVICEACCOUNT]'

Description='Myservice Cache Service'/
...
/Component
/Directory
--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] unable to start a service through MSI

2012-02-01 Thread Wilson, Phil
Service can't start can be a dependency issue. A service that's dependent on 
Dlls being installed to the GAC or to SxS (C++ runtimes) will fail when MSI 
starts because StartServices is before these are committed to the system. It 
will start from Service Control Panel afterwards (if there's no rollback) 
because now the dependencies are installed. 

Phil W 

-Original Message-
From: Michael Osmond [mailto:mosm...@baytech.com.au] 
Sent: Wednesday, February 01, 2012 4:46 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] unable to start a service through MSI

The error message is pretty generic, the service can't start for almost any 
reason.

We have MSIs that run in full dialog mode so there is a dialog popped when the 
service fails to start with the error you are seeing in the eventlog, with a 
retry and cancel options.  
When you get this dialog go to the Services control panel and manual start the 
service, you will often get a more meaningful error.

If you don't get the dialog with the error, change your MSI so it does not try 
start the service, and debug the startup when the install is finished

Michael

-Original Message-
From: Rajesh Khetan [mailto:rajesh.khe...@microsoft.com] 
Sent: Thursday, 2 February 2012 10:29 AM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] unable to start a service through MSI

Hi,

I am currently trying to get my service started as a part of MSI install and am 
unable to do so.  In the event viewer, I see the following error:

Product: Myservice Cache Service -- Error 1920. Service ' Myservice ' 
(Myservice) failed to start.  Verify that you have sufficient privileges to 
start system services.

However, I am logged in as admin. Also, if I simply install the service and 
start the service manually, I am able to do that.  I appreciate any input to 
help me figure out what I might be doing wrong or missing.

One additional data about my service is: I am trying to install the service 
under account NT AUTHORITY\NETWORK SERVICE (Property SERVICEACCOUNT = 'NT 
AUTHORITY\NETWORK SERVICE' below)

Thanks a lot for your help.
Rajesh
PS: Here is a snippet from my WXS file:

Directory Id='TARGETDIR' Name='SourceDir'
Component Id=' MyserviceCacheComponent' Guid='my guid'

!-- The files to be installed --
File Id='Myservice.exe' Name='Myservice.exe' DiskId='1' 
Source='$(var.INETROOT)\target\$(var.BUILDTYPE)\$(var.BUILDTARGET)\Myservice.exe'
 /
File Id='Myservice.pdb' Name='Myservice.pdb' DiskId='1' 
Source='$(var.INETROOT)\target\$(var.BUILDTYPE)\$(var.BUILDTARGET)\Myservice.pdb'
 /

File Id='MyservicePf.dll' Name='MyservicePf.dll' 
SelfRegCost='1' DiskId='1' 
Source='$(var.INETROOT)\target\$(var.BUILDTYPE)\$(var.BUILDTARGET)\MyservicePf.dll'
 /
File Id='MyservicePf.pdb' Name='MyservicePf.pdb' DiskId='1' 
Source='$(var.INETROOT)\target\$(var.BUILDTYPE)\$(var.BUILDTARGET)\MyservicePf.pdb'
 /

RemoveFile Id='REM_MYSERVICE_XML' 
Name='Myservice_Cache_Service.xml' On='uninstall'/

ServiceControl Id='Myservice_Cache_Service' Name='Myservice' 
Start='install' Stop='both' Remove='both' Wait='no'/
ServiceInstall Id='Myservice_Cache_Service' Name='Myservice'

DisplayName='Myservice'

Type='ownProcess'
Start='auto'

ErrorControl='normal'

Account='[SERVICEACCOUNT]'

Description='Myservice Cache Service'/
...
/Component
/Directory
--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists

Re: [WiX-users] unable to start a service through MSI

2012-02-01 Thread Rajesh Khetan
Thanks Phil. Is there a way to ensure in WXS file, such that the service gets 
started  after all the dependent dlls are installed? 


-Original Message-
From: Wilson, Phil [mailto:phil.wil...@invensys.com] 
Sent: Wednesday, February 01, 2012 5:11 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] unable to start a service through MSI

Service can't start can be a dependency issue. A service that's dependent on 
Dlls being installed to the GAC or to SxS (C++ runtimes) will fail when MSI 
starts because StartServices is before these are committed to the system. It 
will start from Service Control Panel afterwards (if there's no rollback) 
because now the dependencies are installed. 

Phil W 

-Original Message-
From: Michael Osmond [mailto:mosm...@baytech.com.au]
Sent: Wednesday, February 01, 2012 4:46 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] unable to start a service through MSI

The error message is pretty generic, the service can't start for almost any 
reason.

We have MSIs that run in full dialog mode so there is a dialog popped when the 
service fails to start with the error you are seeing in the eventlog, with a 
retry and cancel options.  
When you get this dialog go to the Services control panel and manual start the 
service, you will often get a more meaningful error.

If you don't get the dialog with the error, change your MSI so it does not try 
start the service, and debug the startup when the install is finished

Michael

-Original Message-
From: Rajesh Khetan [mailto:rajesh.khe...@microsoft.com]
Sent: Thursday, 2 February 2012 10:29 AM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] unable to start a service through MSI

Hi,

I am currently trying to get my service started as a part of MSI install and am 
unable to do so.  In the event viewer, I see the following error:

Product: Myservice Cache Service -- Error 1920. Service ' Myservice ' 
(Myservice) failed to start.  Verify that you have sufficient privileges to 
start system services.

However, I am logged in as admin. Also, if I simply install the service and 
start the service manually, I am able to do that.  I appreciate any input to 
help me figure out what I might be doing wrong or missing.

One additional data about my service is: I am trying to install the service 
under account NT AUTHORITY\NETWORK SERVICE (Property SERVICEACCOUNT = 'NT 
AUTHORITY\NETWORK SERVICE' below)

Thanks a lot for your help.
Rajesh
PS: Here is a snippet from my WXS file:

Directory Id='TARGETDIR' Name='SourceDir'
Component Id=' MyserviceCacheComponent' Guid='my guid'

!-- The files to be installed --
File Id='Myservice.exe' Name='Myservice.exe' DiskId='1' 
Source='$(var.INETROOT)\target\$(var.BUILDTYPE)\$(var.BUILDTARGET)\Myservice.exe'
 /
File Id='Myservice.pdb' Name='Myservice.pdb' DiskId='1' 
Source='$(var.INETROOT)\target\$(var.BUILDTYPE)\$(var.BUILDTARGET)\Myservice.pdb'
 /

File Id='MyservicePf.dll' Name='MyservicePf.dll' 
SelfRegCost='1' DiskId='1' 
Source='$(var.INETROOT)\target\$(var.BUILDTYPE)\$(var.BUILDTARGET)\MyservicePf.dll'
 /
File Id='MyservicePf.pdb' Name='MyservicePf.pdb' DiskId='1' 
Source='$(var.INETROOT)\target\$(var.BUILDTYPE)\$(var.BUILDTARGET)\MyservicePf.pdb'
 /

RemoveFile Id='REM_MYSERVICE_XML' 
Name='Myservice_Cache_Service.xml' On='uninstall'/

ServiceControl Id='Myservice_Cache_Service' Name='Myservice' 
Start='install' Stop='both' Remove='both' Wait='no'/
ServiceInstall Id='Myservice_Cache_Service' Name='Myservice'

DisplayName='Myservice'

Type='ownProcess'
Start='auto'

ErrorControl='normal'

Account='[SERVICEACCOUNT]'

Description='Myservice Cache Service'/
...
/Component
/Directory
--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers is just 
$99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style 
Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

--
Keep Your Developer Skills Current with LearnDevNow!
The most