Thanks Peter for the response!


I got it working by doing this.



<Component Id="ProductComponent" Guid="f5d54gf1-5792-4a35-a77a-c38bdd2bf0ab">

              <util:User Id="serviceUser" CreateUser="no" FailIfExists="no" 
Name="[USER_NAME]" Password="[PASSWORD]" LogonAsService="yes"> </util:User>

              <File Id="F_XXX_YYY" Name="XXX_YYY.exe" 
Source="$(var.DropTarget)\" Vital="yes" KeyPath="yes" DiskId="1" />

              <ServiceInstall Id="ServiceInstaller" Type="ownProcess" 
Vital="yes" Name="XXX.YYY" DisplayName=" XXX_YYY " Description=" XXX_YYY " 
Start="auto" Account="[USER_NAME]" Password="[PASSWORD]" ErrorControl="ignore" 
Interactive="no" Arguments="[INSTALLDIR] [LABNAME] [LABOWNER] [LABDESCRIPTION] 
[LABACCESS]">

                <util:ServiceConfig FirstFailureActionType="restart" 
SecondFailureActionType="restart" ThirdFailureActionType="restart"/>

              </ServiceInstall>

              <ServiceControl Id="StartService" Start="install" Stop="both" 
Remove="uninstall" Name=" XXX_YYY " Wait="yes" />

            </Component>



Thanks,

Senthil.



-----Original Message-----
From: Peter Shirtcliffe [mailto:pshirtcli...@sdl.com]
Sent: Tuesday, October 9, 2012 2:18 AM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Log on as a service question



You can add the "log on as a service" privilege to a user without creating the 
user when using the User element. In what way does this not work in your 
situation ?



-----Original Message-----

From: Senthil Chandran [mailto:senth...@microsoft.com]

Sent: 09 October 2012 00:55

To: wix-users@lists.sourceforge.net<mailto:wix-users@lists.sourceforge.net>

Subject: [WiX-users] Log on as a service question



Hi,



I collect username and password of the user who I want to run the service as.

Highlighted yellow portion below.



<Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="ProgramFilesFolder"> 
<Directory Id="INSTALLDIR" Name="XXX.YYY">

            <Component Id="ProductComponent"

Guid="f5d665d1-5792-4a35-a77a-c38bdd2bf0ab">

             <File Id="F_XXX_YYY " Name=" XXX.YYY.exe"

Source="$(var.DropTarget)\" Vital="yes" KeyPath="yes" DiskId="1" />



<ServiceInstall Id="ServiceInstaller" Type="ownProcess" Vital="yes"

Name="XXX.YYY" DisplayName="XXX.YYY" Description="desc for XXX.YYY"

Start="auto" Account="[USER_NAME]" Password="[PASSWORD]"

ErrorControl="ignore" Interactive="no" Arguments="[INSTALLDIR] [LABNAME] 
[LABOWNER] [LABDESCRIPTION] [LABACCESS]">

                <util:ServiceConfig FirstFailureActionType="restart"

SecondFailureActionType="restart" ThirdFailureActionType="restart"/>

              </ServiceInstall>

              <ServiceControl Id="StartService" Start="install" Stop="both"

Remove="uninstall" Name="XXX.YYY" Wait="yes" />

            </Component>

</Directory>

</Directory>

</Directory>



If this user is not part of 'Log on as a service', how do I add the user to 
that list through WIX?



I found couple of different ways to make it work, but did not seem to address 
my exact situation.

One way is User Element

(http://wix.sourceforge.net/manual-wix2/wix_xsd_user.htm) with LogonAsService 
property Other way is PermissionEx Element

(http://wix.sourceforge.net/manual-wix3/util_xsd_permissionex.htm) with User 
property set to User="[USER_NAME]" that I collect part of installer.



Thanks,

Senthil.

-----------------------------------------------------------------------------

-

Don't let slow site performance ruin your business. Deploy New Relic APM Deploy 
New Relic app performance management and know exactly what is happening inside 
your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and 
get our sweet Data Nerd shirt too!

http://p.sf.net/sfu/newrelic-dev2dev

_______________________________________________

WiX-users mailing list

WiX-users@lists.sourceforge.net<mailto:WiX-users@lists.sourceforge.net>

https://lists.sourceforge.net/lists/listinfo/wix-users

SDL PLC confidential, all rights reserved.

If you are not the intended recipient of this mail SDL requests and requires 
that you delete it without acting upon or copying any of its contents, and we 
further request that you advise us.

SDL PLC is a public limited company registered in England and Wales.  
Registered number: 02675207.

Registered address: Globe House, Clivemont Road, Maidenhead, Berkshire SL6 7DY, 
UK.





------------------------------------------------------------------------------

Don't let slow site performance ruin your business. Deploy New Relic APM Deploy 
New Relic app performance management and know exactly what is happening inside 
your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and 
get our sweet Data Nerd shirt too!

http://p.sf.net/sfu/newrelic-dev2dev

_______________________________________________

WiX-users mailing list

WiX-users@lists.sourceforge.net<mailto:WiX-users@lists.sourceforge.net>

https://lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to