We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6d33c8f commit 0265317Copy full SHA for 0265317
1 file changed
Install service script.ps1
@@ -1,9 +1,16 @@
1
+param (
2
+ $BinPath = "C:\CommunicationDeviceSwitcherService",
3
+ $Startup = "Automatic",
4
+ $ExeName = "\CommunicationDeviceSwitcherService.exe"
5
+)
6
+
7
$params = @{
8
Name = "CommunicationAudioAutoSwitchService"
- BinaryPathName = "C:\CommunicationDeviceSwitcherService\CommunicationDeviceSwitcherService.exe"
9
+ BinaryPathName = "$BinPath$ExeName"
10
DisplayName = "Communication Audio Auto Switch Service"
11
StartupType = "Automatic"
12
Description = "This service automatically changes default communication output device, when the default playback device is changed"
13
}
14
-New-Service @params
15
+New-Service @params
16
+Start-Service $params.Name
0 commit comments