PHIstw Posted March 6, 2019 Posted March 6, 2019 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
Staff Chris Posted March 6, 2019 Staff Posted March 6, 2019 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.
BartB Posted April 12, 2019 Posted April 12, 2019 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;
eDecisions Posted June 6, 2020 Posted June 6, 2020 Bart, Thank you, I'd never know about chocolatey, I setup and am rocking now, lovely solution.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now