Posted March 6, 20196 yr Hi  I am trying to deploy a new solution on my systems and I thought of a combo Chocolatey + PulseWay in order to facilitate deployement. I managed to install choco using the command: @"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"  When going to the targeted system, I can use choco without any issue. However, from the terminal or scripts in Pulseway, the command "choco" is not recognized. Would you have any idea why and how I can fix this?  Thank you, Regards
March 6, 20196 yr Staff Hi @PHIstw, The Pulseway service is running under the system account on the remote system, therefore it is possible that the Chockolatey is installed only for currently logged in user. Â
April 12, 20196 yr Try using the full path to choco.exe in your scripts, like this: Â @ECHO OFF IF EXIST C:\ProgramData\chocolatey\choco.exe ( C:\ProgramData\chocolatey\choco.exe install curl --no-progress -y ) ELSE (ECHO Chocolatey is not installed - Aborting!) Exit 0; Â
June 6, 20204 yr Bart, Thank you, I'd never know about chocolatey, I setup and am rocking now, lovely solution.
Create an account or sign in to comment