3rd party app - chocolatey install

Support forums for the Habitat Automate plugin
User avatar
Cubert
Posts: 2451
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: 3rd party app - chocolatey install

Post by Cubert »

Also selecting "rescan agents" will quicken the process but will still need awhile for all agents to complete script and return data.

The key is the scan date.

If you get agents that are not updating even after known scans then pull the script log for that agent and post it here so I can see what it was attempting to do and why it failed.

JvdMaat
Posts: 42
Joined: Wed Feb 21, 2018 1:31 am
6

Re: 3rd party app - chocolatey install

Post by JvdMaat »

I'm not seeing Chocolatey getting deployed either. I've had this enabled for a while, and I see timestamps in the Last Scan. App Maintenance is running regularly with two log entries for each app, the second being an error like this:

Quick question. I'm looking at the Habitat App Manage Maintenance script.
The 2nd line checks for Choco.exe and then skips 4 lines, which is the GOTO :INSTALLAPPS.
Should it maybe be skipping 5 lines instead? That seems to be the check for it being in doc & settings, and then the RUNINSTALL to install it.

And Now that I'm fixing it, I see line 8 has the same bug. It also skips 4 lines, which goes to GOTO :INSTALLAPPS. Also needs to be increased to 5.
Last edited by JvdMaat on Tue Apr 28, 2020 12:21 am, edited 1 time in total.

bmcfarlane
Posts: 18
Joined: Wed Jun 26, 2019 9:19 pm
4

Re: 3rd party app - chocolatey install

Post by bmcfarlane »

Getting this when the script prepares to update: 'CHOCOEXE@' is not recognized as an internal or external command,
operable program or batch file.

Correlates to just after this command is run: 0|C:\ProgramData\chocolatey\bin\choco.exe-File or Directory Does Not Exist

and then commands to upgrade the necessary packages but never a command to install it that I see

Getting this type error on checking versions as well. Nothing that shows it has Chocolatey installation

Command returned [jdk8] current version is [ At C:\windows\ltsvc\GetPKGVersion.ps1:12 char:19
+ $lines = @CHOCOEXE@ list $Package --exact
+ ~
Unrecognized token in source text.
At C:\windows\ltsvc\GetPKGVersion.ps1:12 char:19
+ $lines = @CHOCOEXE@ list $Package --exact
+ ~
Unexpected token '@' in expression or statement.
At C:\windows\ltsvc\GetPKGVersion.ps1:12 char:10
+ $lines = @CHOCOEXE@ list $Package --exact
+ ~~~~~~~~~
The splatting operator '@' cannot be used to reference variables in an
expression. '@CHOCOEXE' can be used only as an argument to a command. To
reference variables in an expression use '$CHOCOEXE'.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordEx
ception
+ FullyQualifiedErrorId : UnrecognizedToken ]

JvdMaat
Posts: 42
Joined: Wed Feb 21, 2018 1:31 am
6

Re: 3rd party app - chocolatey install

Post by JvdMaat »

I fixed my local script to skip 5 lines instead of 4, and it's working like a charm now. It installed Chocolatey everywhere, and we found this morning it had updated Zoom on a bunch of our systems.

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

Re: 3rd party app - chocolatey install

Post by Cubert »

Can you send a screen shot of the change you made in script? We want to understand what if anything we need to fix if there is some type of failure.

JvdMaat
Posts: 42
Joined: Wed Feb 21, 2018 1:31 am
6

Re: 3rd party app - chocolatey install

Post by JvdMaat »

As I posted earlier. Line 2 and line 8 say to skip 4 lines. Which should be 5 lines.
(This is the IF check for Choco.exe, and it skips 4 lines instead of 5)
JvdMaat wrote: Fri Apr 24, 2020 8:15 pm Quick question. I'm looking at the Habitat App Manage Maintenance script.
The 2nd line checks for Choco.exe and then skips 4 lines, which is the GOTO :INSTALLAPPS.
Should it maybe be skipping 5 lines instead? That seems to be the check for it being in doc & settings, and then the RUNINSTALL to install it.

And Now that I'm fixing it, I see line 8 has the same bug. It also skips 4 lines, which goes to GOTO :INSTALLAPPS. Also needs to be increased to 5.

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

Re: 3rd party app - chocolatey install

Post by Cubert »

Yeap, we see that. DOH I believe we added a log entry to to both tests and the first log entry pushed the number from 7 to 8. Of course all our test systems already have Chocolatey installed from previous runs so we didn't catch that little mistake.

Its fixed now and will be going out with next release.

JvdMaat
Posts: 42
Joined: Wed Feb 21, 2018 1:31 am
6

Re: 3rd party app - chocolatey install

Post by JvdMaat »

So, yes that first one is fixed. But the second one is still broken (line 8 also needs to increase from 4 to 5)

Was trying to troubleshoot why this wasn't working on a new system, and the .39 update overwrote my manual fix.

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

Re: 3rd party app - chocolatey install

Post by Cubert »

Build 1.0.0.40 due out tonight fixes this issues for good. We labeled each step and have it now jumping to labels instead of rows.

Also added in a new EDF at the location level to allow you to disable a location from updates but still retain versioning scans.

bmcfarlane
Posts: 18
Joined: Wed Jun 26, 2019 9:19 pm
4

Re: 3rd party app - chocolatey install

Post by bmcfarlane »

Thanks I updated the script manually as JvdMaat suggested and mine is working properly now to install Chocolatey if missing. Once the location EDF is there I can start pushing to more clients. Thanks for updating this!

Post Reply

Return to “Habitat”