I have a library step:
if ($ErrorOnNonExist -eq "False") {
Write-Host "Looking for [$BinaryPath]"
$pathFound = Test-Path $BinaryPath
if (!$pathFound) {
Write-Host "File not found: [$BinaryPath]"
return
}
}
Write-Host "Starting [$BinaryPath]"
Start $BinaryPath
I have the step pointing to an existing executable, and correctly finding said executable, but when the “Start” command runs, nothing happens. This does, however, work when I run it locally on the machine:
Start "C:\Program Files (x86)\Folder\SomeFile.exe"
From another post I found on the Octopus forum I saw that I should test the command out by running it in the way Octopus runs it, so I did:
powershell.exe -Command "& Start 'C:\Program Files (x86)\Folder\SomeFile.exe'"
And this also runs fine on the machine. Any idea why when it runs on Octopus it doesn’t error out nor open up the application?