Page 2 of 3
Re: 3rd party app - chocolatey install
Posted: Thu Apr 23, 2020 8:07 pm
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.
Re: 3rd party app - chocolatey install
Posted: Fri Apr 24, 2020 8:15 pm
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.
Re: 3rd party app - chocolatey install
Posted: Mon Apr 27, 2020 6:02 pm
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 ]
Re: 3rd party app - chocolatey install
Posted: Tue Apr 28, 2020 3:17 pm
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.
Re: 3rd party app - chocolatey install
Posted: Tue Apr 28, 2020 7:20 pm
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.
Re: 3rd party app - chocolatey install
Posted: Tue Apr 28, 2020 8:02 pm
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.
Re: 3rd party app - chocolatey install
Posted: Wed Apr 29, 2020 1:12 pm
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.
Re: 3rd party app - chocolatey install
Posted: Sat May 02, 2020 2:37 am
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.
Re: 3rd party app - chocolatey install
Posted: Tue May 05, 2020 6:02 pm
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.
Re: 3rd party app - chocolatey install
Posted: Tue May 05, 2020 6:59 pm
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!