I am installing a Windows service using WiX. How can I make the service run in the context of Windows User that runs the installer?
WiX ServiceInstall - setting the service to run as the current windows user
12.4k Views Asked by kjv At
1
There are 1 best solutions below
Related Questions in WIX
- Wix bundle of third party exe and new msi cant figure out detect conditions
- Getting 'Error writing to file' during WiX Toolset upgrade when changing installation scope
- Unable to format string in desired format - WiX
- wix toolset radio button condition
- How to Add custom dialog to Wix v4
- How to invoke UAC(Elevation shield) Prompt while trying to open bootstrapper bundle exe in WIX
- How do I use heat.exe with Visual Studio extension?
- Is anybody using WiX Toolset v5.0.0-rc.1?
- WixToolset v4 - Installation with scope "PerUser" fails when package NetFx462Redist is used
- Wix not writing to HKCU when run with a user needing admin login?
- WIX project Radio button value usage
- WinAPI / WIX - How to detect if the MSI installer is running on ARM64 or x86?
- Detect re-installation on rollback
- Update to Wix 3.14 from 3.11 get error MSB4181: The "MSBuild" task returned false but did not log an error
- Wix: Error LGHT0091: Duplicate symbol 'Property:WIX_IS_NETFRAMEWORK_472_OR_LATER_INSTALLED' found
Related Questions in SERVICEINSTALL
- WIX stop windows service before install
- WIX Service Installer
- Remove component with in next update in WiX
- Set service account condition in wix if username and password is given
- How to toggle between two usernames in a Wix service installer?
- How to wait for a file being installed to GAC before installing a service with wix
- Create ServiceInstall in Wix on exe from unknown ahead path
- ServiceInstall does not successfully start mywindowsservice
- Service cannot be started. The service process could not connect to the service controller when start service
- WiX ServiceInstall Service Dependency
- Wix Service Install DLL
- Installer OnCommitted question
- Perf counters not installing with service using ServiceInstall
- With a Service install msi, Is there a way to force the installer to re-prompt the user if credentials were entered incorrectly
- Parameterise Service start option in WiX installer
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
You need to have both the account name and password for the user you want to run the service as. I was able to accomplish this by adding a custom UI to my installer asking for a User Name and Password, and then using the supplied values for the Account and Password attributes on the ServiceInsall element.
Note that what ever account is used to run the service will need to have the Log On As Service privileged. This is not granted to users by default. I was able to use the User element from the UtilExtension schema to add this priveledge to the user. Adding the privileged to the user would only succeed if the user running the installer is an administrator.
Here's the code I used. SERVICECREDENTIALS_USERLOGIN and SERVICECREDENTIALS_PASSWORD are the properties populated from the custom UI.