diff --git a/docs/core/extensions/snippets/workers/windows-service-setup/App.WindowsService.Setup/Package.wxs b/docs/core/extensions/snippets/workers/windows-service-setup/App.WindowsService.Setup/Package.wxs index dddfe6a88c036..cfe077f597c36 100644 --- a/docs/core/extensions/snippets/workers/windows-service-setup/App.WindowsService.Setup/Package.wxs +++ b/docs/core/extensions/snippets/workers/windows-service-setup/App.WindowsService.Setup/Package.wxs @@ -52,6 +52,7 @@ DisplayName="$(Name)" Description="A joke service that periodically logs nerdy humor." Start="auto" + Account="LocalService" ErrorControl="normal" /> diff --git a/docs/core/extensions/windows-service-with-installer.md b/docs/core/extensions/windows-service-with-installer.md index d4816d364a977..02af3a9ab1ccb 100644 --- a/docs/core/extensions/windows-service-with-installer.md +++ b/docs/core/extensions/windows-service-with-installer.md @@ -186,15 +186,17 @@ After the project reference has been added, configure the _Package.wxs_ file. Op - + + - - + + - - + + + - + @@ -219,6 +221,7 @@ After the project reference has been added, configure the _Package.wxs_ file. Op DisplayName="$(Name)" Description="A joke service that periodically logs nerdy humor." Start="auto" + Account="LocalService" ErrorControl="normal" /> @@ -240,6 +243,12 @@ After the project reference has been added, configure the _Package.wxs_ file. Op ``` +The `ServiceInstall` element's `Account` attribute specifies the account under which the service runs. The `LocalService` account is a built-in account with reduced privileges that's appropriate for most services. Other common values include: + +- `LocalService`: A built-in account with reduced privileges and no network credentials. +- `NetworkService`: Similar to LocalService but has network credentials. +- `LocalSystem`: The highest privilege level (use with caution). + When you build the project, the output is an MSI file that can be used to install and uninstall the service. # [Microsoft installer extension](#tab/ext)