Closed osudude closed 9 years ago
For some reason the Octopus script would not install our TopShelf service. We had to change it like so:
$service = Get-Service $ServiceName -ErrorAction SilentlyContinue
$fullPath = Resolve-Path $ServiceExecutable
if (! $service) { Write-Host "The service will be installed"
$args = " install -username:$SvcUid -password:$SvcPwd --autostart" Write-Host $args $cmd = "$fullPath" Write-Host $cmd $command = 'cmd.exe /C "' + $fullPath + '" ' + $args Write-Host $command Invoke-Expression -Command:$command
}
Fixed in pull request #2
For some reason the Octopus script would not install our TopShelf service. We had to change it like so:
try and install / update the service by name
$service = Get-Service $ServiceName -ErrorAction SilentlyContinue
$fullPath = Resolve-Path $ServiceExecutable
if (! $service) { Write-Host "The service will be installed"
}