Use stock UI and samples from http://msiext.codeplex.com. You have a ready-to-go screen that will set all the properties correctly, check that the user has logon as a service privilege, etc.
Check some screenshots here: http://msiext.codeplex.com/wikipage?title=Common%20UI%20Wix%20Extension&referringTitle=Home. dB. @ dblock.org Moscow|Geneva|Seattle|New York -----Original Message----- From: Stelios Kyprou [mailto:stelios.kyp...@formicary.net] Sent: Monday, July 19, 2010 12:04 PM To: General discussion for Windows Installer XML toolset. Subject: [WiX-users] [Wix-users] Installing a windows service based on user give account Hello! I am currently trying to install a windows service using ServiceInstall. The requirement i have, is that the account the service will run as, is defined by the user, in a dialog. If: 1) the user chooses Local System, the service should run as Local System 2) the user gives an account, the service should run as that account. When defining the service install, i do the following: <Component Id='ServiceExeComponent' Guid='06C01846-FA5B-40E7-875E-E8A3A13262DE' SharedDllRefCount='no' KeyPath='no' NeverOverwrite='no' Permanent='no' Transitive='no' Win64='yes' Location='either' Directory="INSTALLLOCATION"> <File Id="Alm_Executable" KeyPath="yes" Checksum="yes" Source="$(var.ALM_GC_FilesDir)\ALM_GC.exe" /> <util:User Id="UpdateUserLogonAsService" UpdateIfExists="yes" CreateUser="no" Name="[WINDOWSDOMAIN]\[WINDOWSUSERNAME]" LogonAsService="yes"/> <ServiceInstall Id='ALM_ServiceInstall' DisplayName='Asset Bot' Description='Asset Bot for GC' Name='ALM' ErrorControl='ignore' Type='ownProcess' Start='auto' Vital='yes' Interactive='no'/> <ServiceControl Id='ALM_ServiceControl' Name='ALM' Start='install' Stop='both' Remove='uninstall' Wait='yes'/> </Component> In the case where the user chooses LocalSystem, the service that get's installed has "This account:" set in the "Log on" tab (as NT AUTHORITY/SYSTEM) instead of the "Local System account" radio box. I know that i can make that happen if i don't provide Account and Password in the ServiceInstall tag, but then again it depends on what the user chooses to run the service as in a dialog. What are my options here? Regards, Stelios -- Stelios Kyprou Systems Engineer Formicary - delivering quality financial technology solutions(TM) www.formicary.net ---------------------------------------------------------------------------- This message is confidential and may be privileged. It is intended solely for the named addressee. If you are not the intended recipient, please inform us. Any unauthorised dissemination, distribution or copying hereof is prohibited. Formicary Limited registered office in England and Wales, address 1 Taillar Road, Hedon, East Yorkshire HU12 8GU, registration number 3894343, VAT number 747644304, does not guarantee that the integrity of this communication has been maintained nor that this communication is free of viruses, interceptions or interference. ---------------------------------------------------------------------------- ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users