You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<!-- Create a folder within the parent folder given the name -->
195
-
<DirectoryId="INSTALLFOLDER"Name="$(Name)" />
195
+
<!-- Create a folder within the parent folder given the name -->
196
+
<DirectoryId="INSTALLFOLDER"Name="$(Name)" />
197
+
</Directory>
196
198
</Directory>
197
-
</StandardDirectory>
199
+
</Directory>
198
200
199
201
<!-- The files inside this DirectoryRef are linked to
200
202
the App.WindowsService directory via INSTALLFOLDER -->
@@ -219,6 +221,7 @@ After the project reference has been added, configure the _Package.wxs_ file. Op
219
221
DisplayName="$(Name)"
220
222
Description="A joke service that periodically logs nerdy humor."
221
223
Start="auto"
224
+
Account="LocalService"
222
225
ErrorControl="normal" />
223
226
224
227
<!-- Tell WiX to start the Service -->
@@ -240,6 +243,12 @@ After the project reference has been added, configure the _Package.wxs_ file. Op
240
243
</Wix>
241
244
```
242
245
246
+
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:
247
+
248
+
-`LocalService`: A built-in account with reduced privileges and no network credentials.
249
+
-`NetworkService`: Similar to LocalService but has network credentials.
250
+
-`LocalSystem`: The highest privilege level (use with caution).
251
+
243
252
When you build the project, the output is an MSI file that can be used to install and uninstall the service.
0 commit comments