Jump to content

Recommended Posts

Posted

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
Posted

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.

 

  • 1 month later...
Posted

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;

 

  • 1 year later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...