Chocolatey Not Installing

Support and questions for using and managing Chocolatey NuGet inside of Labtech
tobycarver
Posts: 34
Joined: Mon Jan 11, 2016 8:50 pm
8

Chocolatey Not Installing

Post by tobycarver »

Hello - I have a client that will not install the chocolatey agent. I can't figure out why. Originally, I found errors about some shell issues. I could install the client manually from the computer, but because LT didn't do the install all the automation stuff breaks down. I can't figure out how to manually install the chocolatey agent from the LT console, since the automation isn't taking care of it.

Thanks!

Toby

User avatar
Cubert
Posts: 2467
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: Chocolatey Not Installing

Post by Cubert »

Toby,

Chocolatey is all about Powershell so it may be a disconnect between LT and executing PoSh. Can you post the script logs to the thread here during a forced install?


To force another attempt at install do the following.

Go here and click your installed agents number to open the management console for Choco installs
choco5.png
choco5.png (128.52 KiB) Viewed 18554 times
Next find the systems that have a missing Path. If it has a QwA6xxxxxxxxxxx in Path that is valid but a Null path is a sign of a failing system. Select system in list then right click for menu to force a reinstall. Then monitor your script logs and the Command tab of computer console to see the results. Post the results.

tobycarver
Posts: 34
Joined: Mon Jan 11, 2016 8:50 pm
8

Re: Chocolatey Not Installing

Post by tobycarver »

Thank you for the reply. I did as instructed and I'm not sure what log information you want. I have the output of the failed command from within computer's console within LT. It's below:

Parameters: cmd.exe!!! /c "@powershell -NoProfile -ExecutionPolicy Bypass -Command
Output: The shell cannot be started. A failure occurred during initialization:
Object reference not set to an instance of an object.

Do you want any other information? This is a new computer with a fresh load of the OS. I looked up the last line of the error, but it's not clear how that relates to Chocolatey and Powershell. Thanks for the help.

User avatar
Cubert
Posts: 2467
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: Chocolatey Not Installing

Post by Cubert »

Toby,

These 2 tabs should provide the information needed to why it has failed.
Capture.PNG
Capture.PNG (55.75 KiB) Viewed 18657 times
Can you post screen shots of these 2 tabs and select the lines that error so that the bottom half of screen shows the whole error

tobycarver
Posts: 34
Joined: Mon Jan 11, 2016 8:50 pm
8

Re: Chocolatey Not Installing

Post by tobycarver »

OK, the screenshots are attached.
Attachments
Command.jpg
Command.jpg (213.11 KiB) Viewed 18656 times
Scripts1.jpg
Scripts1.jpg (224.89 KiB) Viewed 18656 times

User avatar
Cubert
Posts: 2467
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: Chocolatey Not Installing

Post by Cubert »

Where is Choco.exe on that system located?

You said you did manually install Chocolatey or no?


If No and it is not installed then from the Command prompt tab run the following and post it's output.

Code: Select all

@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
This is the command that installs Chocolatey, if it installs ok then check to see if a Choco.exe exists anywhere on system. Post path

tobycarver
Posts: 34
Joined: Mon Jan 11, 2016 8:50 pm
8

Re: Chocolatey Not Installing

Post by tobycarver »

I installed it manually, but Labtech kept trying to find files pertaining to chocolatey within the C:\Windows\LTSvc. When LT installs things, related software is installed in this folder, so I assumed the errors were due to me installing it manually. With that in mind, I uninstalled chocolatey. In the end, is the error when LT tries to install it. Do you know what that error is about?

I'll try to re-install using the syntax you provided. Once it's installed, how do I force a chocolatey scan of that computer in regards to software to install or update? If I can't do that, then I have to wait until the next scheduled run.

tobycarver
Posts: 34
Joined: Mon Jan 11, 2016 8:50 pm
8

Re: Chocolatey Not Installing

Post by tobycarver »

I ran the command and chocolatey is installed. I assume we now need LT to run the maintenance scripts. Can I induce that manually?

tobycarver
Posts: 34
Joined: Mon Jan 11, 2016 8:50 pm
8

Re: Chocolatey Not Installing

Post by tobycarver »

OK, so I forced another install of chocolatey after I had installed it manually on the computer using the command you provided. I still get the error as before, "A failure occurred during initialization: Object reference not set to an instance of an object.", but initializing the install from LT caused the maintenance script(s) to run. I'm not back to the error before where it's looking for components of chocolatey is missing within the Windows\LTSvc folder, so the maintenance scripts fail. I have provided the screenshots again.
Attachments
Scripts2.jpg
Scripts2.jpg (105.91 KiB) Viewed 18653 times
Scripts1.jpg
Scripts1.jpg (112.39 KiB) Viewed 18653 times
Command1.jpg
Command1.jpg (131.82 KiB) Viewed 18653 times

User avatar
Cubert
Posts: 2467
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: Chocolatey Not Installing

Post by Cubert »

tobycarver wrote:I ran the command and chocolatey is installed. I assume we now need LT to run the maintenance scripts. Can I induce that manually?
Looking at your logs the script is running against your system and a response is received. I see the text file being read and it shows AdobeAir and Chocolatey versions as it should, Then we execute a Powershell function to convert text file to a SQL file. Very simple code if PoSh is working and is in global path. We then read in the sql file and save it to the database.

You are not getting the SQL file and thus no data in DB that Chocolatey is installed.

If you go into the script Chocolatey Maintenance in the Maintenance script folder you will find on line 12 of the Else section of script is a Powershell Script. Copy that script to a file and the open that file with PowerShell ISE as admin and execute. You may need to set the full path to both files in the first few lines (if poSh can not determine location based on the profile your using) .

Does it take the chocoscan.txt file and make a chocoscan.sql file out of it?

Post Reply

Return to “Chocolatey For Labtech”