Help Getting Chocolatey for Automate Going

This forum is for the discussions and support for the Chocolatey For Automate plugin. Inside you will find the Documentation Project forum that describes the operation of the plugin.
Locked
PL-MSTech
Posts: 47
Joined: Mon Jul 31, 2023 10:07 pm

Help Getting Chocolatey for Automate Going

Post by PL-MSTech »

I'm like the other guys... maybe I am just flat-out missing something! If so, I will be the first to admit ignorance, but I have read the forum posts, but for the life of me, I can't seem to make it work...
I have tried a caching agent at one location and am getting the same results as the last location that I only setup with 1 standalone. I plan to have caching agents at each location, but need to get one working correctly first.

Here are Global Settings.
Global Settings
Global Settings
09.08.2023_18.29.10_REC.png (43.63 KiB) Viewed 61498 times
First, how do we set all or some of the options we see if we add a package from Installed Software (Active, Install, Update) for the global apps?
And how do we know if it is currently set to install or uninstall globally - because if we click the icon beside the package in global, it defaults to 'remove application from list' - sure, we can see if it is enabled or disabled in the table, but what about the other options (install globally, uninstall globally, update, or active... and is active the same as enabled)?

At each of the locations, I started with a scan.

The standalone is green for current and enabled, but only shows 3 managed applications....
standalone
standalone
standalone.png (35.08 KiB) Viewed 61498 times
There are hundreds if not thousands of scripts... are we expected to look through all of them to find any errors?
Today, for example, the first script shows this (on the site I only enabled 1 machine as standalone):
Skipping all caching services and direcly installing updates from chocolatey repository.
Another script shows this...
>>The Application [7zip.install] is set to ignore updates and installs or is already current, skipping app updates.

So, which is it? I'm assuming the green under 'enable' means it is set for auto updates?

The next (applicable?) script is this...
>>The Application [adobereader] is set to ignore updates and installs or is already current, skipping app updates.

Ok, so it matched it and it is current... why doesn't it show up as managed?

Next...
>>The Application [dropbox] is set to ignore updates and installs or is already current, skipping app updates.

Well, no... dropbox, as seen in global, should be set to enabled just like the others.

Next...
>>The Application [windirstat] is set to ignore updates and installs or is already current, skipping app updates.

Windirstat is not showing up in installed software... so maybe it is disabled somewhere other than where I know to look (global)?? If there is nowhere else to disable it, why is it being skipped?

And for any apps that it finds that MAY BE installed and up to date, why don't they show up in Managed Applications?

So (1)it is thinking that some apps are disabled, when they are enabled in global... and (2)installed apps not showing in Managed Apps are the first things (for now I suppose)... so I will skip past the other similar 'Information' logs and post the first 'Result' Log I come to... please let me know what I need to do before I waste another week trying to figure this out.



>>
The Script(6197) was successful in the Then section.

Script: S6197 - Starting at Server Time: Wednesday, August 9, 2023 1:48:50 AM
IF F5 ValueOne (P1): MYCMD Comparer (P2): 2 ValueTwo (P3): AGENTSYNC T: 1.1283859
L2 F117 Sql (P1): 'SELECT count(*) as `Suspended` FROM `plugin_p4a_chocolatey_clients` WHERE ClientID = '1' a...' T: 1.1283859
L3 F31 Control (P1): 1 T: 1.1283859
L4 F54 T: 5.1703275
L5 F139 Note (P1): This section reserved for secondary agents to sync with the current location cache. T: 13.2016893
L6 F20 SetType(P1):11 Parameter(P2):'SELECT count(ComputerID) FROM ...' VariableName(P3):LONEWOLF T: 13.2016893
L7 F114 File (P1): 'C:\ProgramData\chocolatey\choc...' Check (P2): 1 Jump (P3): :CHOCOINSTALL T: 13.2016893
L8 F139 Note (P1): :STARTSYNCSERVICE T: 15.2117621
L9 F20 SetType(P1):1 Parameter(P2):'C:\ProgramData\chocolatey\bin\...' VariableName(P3):CHOCOINST T: 15.2128381
L10 F20 SetType(P1):1 Parameter(P2):'C:\ProgramData\chocolatey\choc...' VariableName(P3):CHOCOEXE T: 15.2128381
L11 F20 SetType(P1):1 Parameter(P2):1 VariableName(P3):LOOPCOUNT T: 15.2128381
L12 F90 File (P1): %ltsvcdir%\Chocolatey\GetPKGVersion.ps1 T: 15.2128381
L13 F70 Value (P1): LONEWOLF Comparer (P2): 2 To (P3): 1 Jump (P4): :EXECUTELONEWOLF T: 21.2392683
L138 F139 Note (P1): :EXECUTELONEWOLF T: 21.2392683
L139 F29 Message (P1): Skipping all caching services and direcly installing updates from chocolatey repository. T: 21.2392683
L140 F196 SQL (P1): 'SELECT a.ID, a.RepoName, a.AppName, a.Version FROM `plugin_p4a_chocolatey_applications` a...' T: 21.2392683
L141 F70 Value (P1): 12 Comparer (P2): 2 To (P3): 0 Jump (P4): :CLEANUP T: 21.2392683
L142 F139 Note (P1): :LOOPSTARTLONEWOLF T: 21.2392683
L143 F20 SetType(P1):1 Parameter(P2): VariableName(P3):REPONAME T: 21.2392683
L144 F20 SetType(P1):1 Parameter(P2): VariableName(P3):APPVERSION T: 21.2392683
L145 F20 SetType(P1):1 Parameter(P2): VariableName(P3):IGNORE T: 21.2392683
L146 F20 SetType(P1):1 Parameter(P2): VariableName(P3):myAPPID T: 21.2392683
L147 F197 Variable (P1): sqldataset RowIndex (P2): 1 T: 21.2392683
L148 F20 SetType(P1):1 Parameter(P2):7zip.install VariableName(P3):REPONAME T: 21.2392683
L149 F20 SetType(P1):1 Parameter(P2):23.1.0 VariableName(P3):APPVERSION T: 21.2392683
L150 F20 SetType(P1):1 Parameter(P2):7-zip% VariableName(P3):APPNAME T: 21.2392683
L151 F20 SetType(P1):1 Parameter(P2):1 VariableName(P3):myAPPID T: 21.2392683
L152 F29 Message (P1): Scanning software installs with [ 7-zip% ] T: 21.2392683
L153 F20 SetType(P1):11 Parameter(P2):'SELECT `AppID` FROM `software`...' VariableName(P3):APPID T: 21.2392683
L154 F70 Value (P1): APPID Comparer (P2): 8 To (P3): -9999 Jump (P4): :SKIPAPPUPDATELONEWOLF T: 21.2392683
L155 F70 Value (P1): APPID Comparer (P2): 2 To (P3): Jump (P4): :SKIPAPPUPDATELONEWOLF T: 21.2469282
L156 F70 Value (P1): APPID Comparer (P2): 2 To (P3): 0 Jump (P4): :SKIPAPPUPDATELONEWOLF T: 21.2469282
L157 F70 Value (P1): APPID Comparer (P2): 2 To (P3): 1 Jump (P4): :SKIPAPPUPDATELONEWOLF T: 21.2469282
L158 F70 Value (P1): APPID Comparer (P2): 1 To (P3): Jump (P4): :SKIPAPPUPDATELONEWOLF T: 21.2469282
L159 F29 Message (P1): Matching softwareID found [ 42651472 ] for [ 7zip.install ] T: 21.2469282
L160 F67 Sql (P1): 'INSERT INTO `plugin_p4a_chocolatey_agent_apps`(`ComputerID`,`ClientID`,`SoftwareID`,`AppAs...' T: 21.2469282
L161 F117 Sql (P1): 'SELECT count(*) FROM plugin_p4a_chocolatey_agent_apps WHERE AppAssocID = '1' and ComputerI...' T: 21.2469282
L162 F117 Sql (P1): 'SELECT count(*) FROM plugin_p4a_chocolatey_agent_apps WHERE AppAssocID = '1' and ComputerI...' T: 21.2469282
L185 F139 Note (P1): :SKIPAPPUPDATELONEWOLF T: 21.2469282
L186 F29 Message (P1): 'The Application [7zip.install] is set to ignore updates and installs or is already current...' T: 21.2469282
L187 F101 ValueOne (P1): 1 Operator (P2): 0 ValueTwo (P3): 1 Variable (P4): LOOPCOUNT T: 21.2469282
L188 F70 Value (P1): LOOPCOUNT Comparer (P2): 5 To (P3): 12 Jump (P4): :LOOPSTARTLONEWOLF T: 21.2469282
L142 F139 Note (P1): :LOOPSTARTLONEWOLF T: 21.2469282
L143 F20 SetType(P1):1 Parameter(P2): VariableName(P3):REPONAME T: 21.2469282
L144 F20 SetType(P1):1 Parameter(P2): VariableName(P3):APPVERSION T: 21.2469282
L145 F20 SetType(P1):1 Parameter(P2): VariableName(P3):IGNORE T: 21.2469282
L146 F20 SetType(P1):1 Parameter(P2): VariableName(P3):myAPPID T: 21.2469282
L147 F197 Variable (P1): sqldataset RowIndex (P2): 2 T: 21.2469282
L148 F20 SetType(P1):1 Parameter(P2):jre8 VariableName(P3):REPONAME T: 21.2469282
L149 F20 SetType(P1):1 Parameter(P2):8.0.381 VariableName(P3):APPVERSION T: 21.2469282
L150 F20 SetType(P1):1 Parameter(P2):Java%8% VariableName(P3):APPNAME T: 21.2469282
L151 F20 SetType(P1):1 Parameter(P2):2 VariableName(P3):myAPPID T: 21.2469282
L152 F29 Message (P1): Scanning software installs with [ Java%8% ] T: 21.2469282
L153 F20 SetType(P1):11 Parameter(P2):'SELECT `AppID` FROM `software`...' VariableName(P3):APPID T: 21.2469282
L154 F70 Value (P1): APPID Comparer (P2): 8 To (P3): -9999 Jump (P4): :SKIPAPPUPDATELONEWOLF T: 21.2469282
L155 F70 Value (P1): APPID Comparer (P2): 2 To (P3): Jump (P4): :SKIPAPPUPDATELONEWOLF T: 21.2469282
L156 F70 Value (P1): APPID Comparer (P2): 2 To (P3): 0 Jump (P4): :SKIPAPPUPDATELONEWOLF T: 21.2469282
L157 F70 Value (P1): APPID Comparer (P2): 2 To (P3): 1 Jump (P4): :SKIPAPPUPDATELONEWOLF T: 21.2469282
L158 F70 Value (P1): APPID Comparer (P2): 1 To (P3): Jump (P4): :SKIPAPPUPDATELONEWOLF T: 21.2469282
L159 F29 Message (P1): Matching softwareID found [ 42651476 ] for [ jre8 ] T: 21.2469282
L160 F67 Sql (P1): 'INSERT INTO `plugin_p4a_chocolatey_agent_apps`(`ComputerID`,`ClientID`,`SoftwareID`,`AppAs...' T: 21.2469282
L161 F117 Sql (P1): 'SELECT count(*) FROM plugin_p4a_chocolatey_agent_apps WHERE AppAssocID = '2' and ComputerI...' T: 21.2624858
L162 F117 Sql (P1): 'SELECT count(*) FROM plugin_p4a_chocolatey_agent_apps WHERE AppAssocID = '2' and ComputerI...' T: 21.2624858
L185 F139 Note (P1): :SKIPAPPUPDATELONEWOLF T: 21.2624858
L186 F29 Message (P1): 'The Application [jre8] is set to ignore updates and installs or is already current, skippi...' T: 21.2624858
L187 F101 ValueOne (P1): 2 Operator (P2): 0 ValueTwo (P3): 1 Variable (P4): LOOPCOUNT T: 21.2624858
L188 F70 Value (P1): LOOPCOUNT Comparer (P2): 5 To (P3): 12 Jump (P4): :LOOPSTARTLONEWOLF T: 21.2624858
L142 F139 Note (P1): :LOOPSTARTLONEWOLF T: 21.2624858
L143 F20 SetType(P1):1 Parameter(P2): VariableName(P3):REPONAME T: 21.2624858
L144 F20 SetType(P1):1 Parameter(P2): VariableName(P3):APPVERSION T: 21.2624858
L145 F20 SetType(P1):1 Parameter(P2): VariableName(P3):IGNORE T: 21.2624858
L146 F20 SetType(P1):1 Parameter(P2): VariableName(P3):myAPPID T: 21.2624858
L147 F197 Variable (P1): sqldataset RowIndex (P2): 3 T: 21.2624858
L148 F20 SetType(P1):1 Parameter(P2):googlechrome VariableName(P3):REPONAME T: 21.2624858
L149 F20 SetType(P1):1 Parameter(P2):115.0.5790.171 VariableName(P3):APPVERSION T: 21.2624858
L150 F20 SetType(P1):1 Parameter(P2):Google Chrome VariableName(P3):APPNAME T: 21.2624858
L151 F20 SetType(P1):1 Parameter(P2):4 VariableName(P3):myAPPID T: 21.2624858
L152 F29 Message (P1): Scanning software installs with [ Google Chrome ] T: 21.2624858
L153 F20 SetType(P1):11 Parameter(P2):'SELECT `AppID` FROM `software`...' VariableName(P3):APPID T: 21.2624858
L154 F70 Value (P1): APPID Comparer (P2): 8 To (P3): -9999 Jump (P4): :SKIPAPPUPDATELONEWOLF T: 21.2624858
L155 F70 Value (P1): APPID Comparer (P2): 2 To (P3): Jump (P4): :SKIPAPPUPDATELONEWOLF T: 21.2624858
L156 F70 Value (P1): APPID Comparer (P2): 2 To (P3): 0 Jump (P4): :SKIPAPPUPDATELONEWOLF T: 21.2624858
L157 F70 Value (P1): APPID Comparer (P2): 2 To (P3): 1 Jump (P4): :SKIPAPPUPDATELONEWOLF T: 21.2624858
L158 F70 Value (P1): APPID Comparer (P2): 1 To (P3): Jump (P4): :SKIPAPPUPDATELONEWOLF T: 21.2624858
L159 F29 Message (P1): Matching softwareID found [ 42651477 ] for [ googlechrome ] T: 21.2624858
L160 F67 Sql (P1): 'INSERT INTO `plugin_p4a_chocolatey_agent_apps`(`ComputerID`,`ClientID`,`SoftwareID`,`AppAs...' T: 21.2624858
L161 F117 Sql (P1): 'SELECT count(*) FROM plugin_p4a_chocolatey_agent_apps WHERE AppAssocID = '4' and ComputerI...' T: 21.2781455
L162 F117 Sql (P1): 'SELECT count(*) FROM plugin_p4a_chocolatey_agent_apps WHERE AppAssocID = '4' and ComputerI...' T: 21.2781455
L185 F139 Note (P1): :SKIPAPPUPDATELONEWOLF T: 21.2781455
L186 F29 Message (P1): 'The Application [googlechrome] is set to ignore updates and installs or is already current...' T: 21.2781455
L187 F101 ValueOne (P1): 3 Operator (P2): 0 ValueTwo (P3): 1 Variable (P4): LOOPCOUNT T: 21.2781455
L188 F70 Value (P1): LOOPCOUNT Comparer (P2): 5 To (P3): 12 Jump (P4): :LOOPSTARTLONEWOLF T: 21.2781455
L142 F139 Note (P1): :LOOPSTARTLONEWOLF T: 21.2781455
L143 F20 SetType(P1):1 Parameter(P2): VariableName(P3):REPONAME T: 21.2781455
L144 F20 SetType(P1):1 Parameter(P2): VariableName(P3):APPVERSION T: 21.2781455
L145 F20 SetType(P1):1 Parameter(P2): VariableName(P3):IGNORE T: 21.2781455
L146 F20 SetType(P1):1 Parameter(P2): VariableName(P3):myAPPID T: 21.2781455
L147 F197 Variable (P1): sqldataset RowIndex (P2): 4 T: 21.2781455
L148 F20 SetType(P1):1 Parameter(P2):adobereader VariableName(P3):REPONAME T: 21.2781455
L149 F20 SetType(P1):1 Parameter(P2):2023.3.20244 VariableName(P3):APPVERSION T: 21.2781455
L150 F20 SetType(P1):1 Parameter(P2):Adobe Acrobat Reader%MUI% VariableName(P3):APPNAME T: 21.2781455
L151 F20 SetType(P1):1 Parameter(P2):5 VariableName(P3):myAPPID T: 21.2781455
L152 F29 Message (P1): Scanning software installs with [ Adobe Acrobat Reader%MUI% ] T: 21.2781455
L153 F20 SetType(P1):11 Parameter(P2):'SELECT `AppID` FROM `software`...' VariableName(P3):APPID T: 21.2781455
L154 F70 Value (P1): APPID Comparer (P2): 8 To (P3): -9999 Jump (P4): :SKIPAPPUPDATELONEWOLF T: 21.2781455
L185 F139 Note (P1): :SKIPAPPUPDATELONEWOLF T: 21.2781455
L186 F29 Message (P1): 'The Application [adobereader] is set to ignore updates and installs or is already current,...' T: 21.2781455
L187 F101 ValueOne (P1): 4 Operator (P2): 0 ValueTwo (P3): 1 Variable (P4): LOOPCOUNT T: 21.2781455
L188 F70 Value (P1): LOOPCOUNT Comparer (P2): 5 To (P3): 12 Jump (P4): :LOOPSTARTLONEWOLF T: 21.2781455
L142 F139 Note (P1): :LOOPSTARTLONEWOLF T: 21.2781455
L143 F20 SetType(P1):1 Parameter(P2): VariableName(P3):REPONAME T: 21.2781455
L144 F20 SetType(P1):1 Parameter(P2): VariableName(P3):APPVERSION T: 21.2781455
L145 F20 SetType(P1):1 Parameter(P2): VariableName(P3):IGNORE T: 21.2781455
L146 F20 SetType(P1):1 Parameter(P2): VariableName(P3):myAPPID T: 21.2781455
L147 F197 Variable (P1): sqldataset RowIndex (P2): 5 T: 21.2781455
L148 F20 SetType(P1):1 Parameter(P2):dropbox VariableName(P3):REPONAME T: 21.2781455
L149 F20 SetType(P1):1 Parameter(P2):179.4.4985 VariableName(P3):APPVERSION T: 21.2781455
L150 F20 SetType(P1):1 Parameter(P2):Dropbox VariableName(P3):APPNAME T: 21.2781455
L151 F20 SetType(P1):1 Parameter(P2):9 VariableName(P3):myAPPID T: 21.2781455
L152 F29 Message (P1): Scanning software installs with [ Dropbox ] T: 21.2781455
L153 F20 SetType(P1):11 Parameter(P2):'SELECT `AppID` FROM `software`...' VariableName(P3):APPID T: 21.2781455
L154 F70 Value (P1): APPID Comparer (P2): 8 To (P3): -9999 Jump (P4): :SKIPAPPUPDATELONEWOLF T: 21.2781455
L185 F139 Note (P1): :SKIPAPPUPDATELONEWOLF T: 21.2781455
L186 F29 Message (P1): 'The Application [dropbox] is set to ignore updates and installs or is already current, ski...' T: 21.2781455
L187 F101 ValueOne (P1): 5 Operator (P2): 0 ValueTwo (P3): 1 Variable (P4): LOOPCOUNT T: 21.2781455
L188 F70 Value (P1): LOOPCOUNT Comparer (P2): 5 To (P3): 12 Jump (P4): :LOOPSTARTLONEWOLF T: 21.2781455
L142 F139 Note (P1): :LOOPSTARTLONEWOLF T: 21.2781455
L143 F20 SetType(P1):1 Parameter(P2): VariableName(P3):REPONAME T: 21.2781455
L144 F20 SetType(P1):1 Parameter(P2): VariableName(P3):APPVERSION T: 21.2781455
L145 F20 SetType(P1):1 Parameter(P2): VariableName(P3):IGNORE T: 21.2781455
L146 F20 SetType(P1):1 Parameter(P2): VariableName(P3):myAPPID T: 21.2781455
L147 F197 Variable (P1): sqldataset RowIndex (P2): 6 T: 21.2781455
L148 F20 SetType(P1):1 Parameter(P2):firefox VariableName(P3):REPONAME T: 21.2781455
L149 F20 SetType(P1):1 Parameter(P2):116.0.2 VariableName(P3):APPVERSION T: 21.2781455
L150 F20 SetType(P1):1 Parameter(P2):Mozilla Firefox% VariableName(P3):APPNAME T: 21.2781455
L151 F20 SetType(P1):1 Parameter(P2):13 VariableName(P3):myAPPID T: 21.2781455
L152 F29 Message (P1): Scanning software installs with [ Mozilla Firefox% ] T: 21.2781455
L153 F20 SetType(P1):11 Parameter(P2):'SELECT `AppID` FROM `software`...' VariableName(P3):APPID T: 21.293729
L154 F70 Value (P1): APPID Comparer (P2): 8 To (P3): -9999 Jump (P4): :SKIPAPPUPDATELONEWOLF T: 21.293729
L185 F139 Note (P1): :SKIPAPPUPDATELONEWOLF T: 21.293729
L186 F29 Message (P1): 'The Application [firefox] is set to ignore updates and installs or is already current, ski...' T: 21.293729
L187 F101 ValueOne (P1): 6 Operator (P2): 0 ValueTwo (P3): 1 Variable (P4): LOOPCOUNT T: 21.293729
L188 F70 Value (P1): LOOPCOUNT Comparer (P2): 5 To (P3): 12 Jump (P4): :LOOPSTARTLONEWOLF T: 21.293729
L142 F139 Note (P1): :LOOPSTARTLONEWOLF T: 21.293729
L143 F20 SetType(P1):1 Parameter(P2): VariableName(P3):REPONAME T: 21.293729
L144 F20 SetType(P1):1 Parameter(P2): VariableName(P3):APPVERSION T: 21.293729
L145 F20 SetType(P1):1 Parameter(P2): VariableName(P3):IGNORE T: 21.293729
L146 F20 SetType(P1):1 Parameter(P2): VariableName(P3):myAPPID T: 21.293729
L147 F197 Variable (P1): sqldataset RowIndex (P2): 7 T: 21.293729
L148 F20 SetType(P1):1 Parameter(P2):notepadplusplus.install VariableName(P3):REPONAME T: 21.293729
L149 F20 SetType(P1):1 Parameter(P2):8.5.4 VariableName(P3):APPVERSION T: 21.293729
L150 F20 SetType(P1):1 Parameter(P2):notepad++% VariableName(P3):APPNAME T: 21.293729
L151 F20 SetType(P1):1 Parameter(P2):16 VariableName(P3):myAPPID T: 21.293729
L152 F29 Message (P1): Scanning software installs with [ notepad++% ] T: 21.293729
L153 F20 SetType(P1):11 Parameter(P2):'SELECT `AppID` FROM `software`...' VariableName(P3):APPID T: 21.293729
L154 F70 Value (P1): APPID Comparer (P2): 8 To (P3): -9999 Jump (P4): :SKIPAPPUPDATELONEWOLF T: 21.293729
L185 F139 Note (P1): :SKIPAPPUPDATELONEWOLF T: 21.293729
L186 F29 Message (P1): 'The Application [notepadplusplus.install] is set to ignore updates and installs or is alre...' T: 21.293729
L187 F101 ValueOne (P1): 7 Operator (P2): 0 ValueTwo (P3): 1 Variable (P4): LOOPCOUNT T: 21.293729
L188 F70 Value (P1): LOOPCOUNT Comparer (P2): 5 To (P3): 12 Jump (P4): :LOOPSTARTLONEWOLF T: 21.293729
L142 F139 Note (P1): :LOOPSTARTLONEWOLF T: 21.293729
L143 F20 SetType(P1):1 Parameter(P2): VariableName(P3):REPONAME T: 21.293729
L144 F20 SetType(P1):1 Parameter(P2): VariableName(P3):APPVERSION T: 21.293729
L145 F20 SetType(P1):1 Parameter(P2): VariableName(P3):IGNORE T: 21.293729
L146 F20 SetType(P1):1 Parameter(P2): VariableName(P3):myAPPID T: 21.293729
L147 F197 Variable (P1): sqldataset RowIndex (P2): 8 T: 21.293729
L148 F20 SetType(P1):1 Parameter(P2):putty.install VariableName(P3):REPONAME T: 21.293729
L149 F20 SetType(P1):1 Parameter(P2):0.78 VariableName(P3):APPVERSION T: 21.293729
L150 F20 SetType(P1):1 Parameter(P2):Putty% VariableName(P3):APPNAME T: 21.293729
L151 F20 SetType(P1):1 Parameter(P2):17 VariableName(P3):myAPPID T: 21.293729
L152 F29 Message (P1): Scanning software installs with [ Putty% ] T: 21.293729
L153 F20 SetType(P1):11 Parameter(P2):'SELECT `AppID` FROM `software`...' VariableName(P3):APPID T: 21.293729
L154 F70 Value (P1): APPID Comparer (P2): 8 To (P3): -9999 Jump (P4): :SKIPAPPUPDATELONEWOLF T: 21.293729
L185 F139 Note (P1): :SKIPAPPUPDATELONEWOLF T: 21.293729
L186 F29 Message (P1): 'The Application [putty.install] is set to ignore updates and installs or is already curren...' T: 21.293729
L187 F101 ValueOne (P1): 8 Operator (P2): 0 ValueTwo (P3): 1 Variable (P4): LOOPCOUNT T: 21.293729
L188 F70 Value (P1): LOOPCOUNT Comparer (P2): 5 To (P3): 12 Jump (P4): :LOOPSTARTLONEWOLF T: 21.293729
L142 F139 Note (P1): :LOOPSTARTLONEWOLF T: 21.293729
L143 F20 SetType(P1):1 Parameter(P2): VariableName(P3):REPONAME T: 21.293729
L144 F20 SetType(P1):1 Parameter(P2): VariableName(P3):APPVERSION T: 21.293729
L145 F20 SetType(P1):1 Parameter(P2): VariableName(P3):IGNORE T: 21.293729
L146 F20 SetType(P1):1 Parameter(P2): VariableName(P3):myAPPID T: 21.293729
L147 F197 Variable (P1): sqldataset RowIndex (P2): 9 T: 21.293729
L148 F20 SetType(P1):1 Parameter(P2):windirstat VariableName(P3):REPONAME T: 21.293729
L149 F20 SetType(P1):1 Parameter(P2):1.1.2.20161210 VariableName(P3):APPVERSION T: 21.293729
L150 F20 SetType(P1):1 Parameter(P2):WinDirStat% VariableName(P3):APPNAME T: 21.293729
L151 F20 SetType(P1):1 Parameter(P2):30 VariableName(P3):myAPPID T: 21.3093543
L152 F29 Message (P1): Scanning software installs with [ WinDirStat% ] T: 21.3093543
L153 F20 SetType(P1):11 Parameter(P2):'SELECT `AppID` FROM `software`...' VariableName(P3):APPID T: 21.3093543
L154 F70 Value (P1): APPID Comparer (P2): 8 To (P3): -9999 Jump (P4): :SKIPAPPUPDATELONEWOLF T: 21.3093543
L185 F139 Note (P1): :SKIPAPPUPDATELONEWOLF T: 21.3093543
L186 F29 Message (P1): 'The Application [windirstat] is set to ignore updates and installs or is already current, ...' T: 21.3093543
L187 F101 ValueOne (P1): 9 Operator (P2): 0 ValueTwo (P3): 1 Variable (P4): LOOPCOUNT T: 21.3093543
L188 F70 Value (P1): LOOPCOUNT Comparer (P2): 5 To (P3): 12 Jump (P4): :LOOPSTARTLONEWOLF T: 21.3093543
L142 F139 Note (P1): :LOOPSTARTLONEWOLF T: 21.3093543
L143 F20 SetType(P1):1 Parameter(P2): VariableName(P3):REPONAME T: 21.3093543
L144 F20 SetType(P1):1 Parameter(P2): VariableName(P3):APPVERSION T: 21.3093543
L145 F20 SetType(P1):1 Parameter(P2): VariableName(P3):IGNORE T: 21.3093543
L146 F20 SetType(P1):1 Parameter(P2): VariableName(P3):myAPPID T: 21.3093543
L147 F197 Variable (P1): sqldataset RowIndex (P2): 10 T: 21.3093543
L148 F20 SetType(P1):1 Parameter(P2):vlc VariableName(P3):REPONAME T: 21.3093543
L149 F20 SetType(P1):1 Parameter(P2):3.0.18 VariableName(P3):APPVERSION T: 21.3093543
L150 F20 SetType(P1):1 Parameter(P2):VLC% VariableName(P3):APPNAME T: 21.3093543
L151 F20 SetType(P1):1 Parameter(P2):31 VariableName(P3):myAPPID T: 21.3093543
L152 F29 Message (P1): Scanning software installs with [ VLC% ] T: 21.3093543
L153 F20 SetType(P1):11 Parameter(P2):'SELECT `AppID` FROM `software`...' VariableName(P3):APPID T: 21.3093543
L154 F70 Value (P1): APPID Comparer (P2): 8 To (P3): -9999 Jump (P4): :SKIPAPPUPDATELONEWOLF T: 21.3093543
L185 F139 Note (P1): :SKIPAPPUPDATELONEWOLF T: 21.3093543
L186 F29 Message (P1): 'The Application [vlc] is set to ignore updates and installs or is already current, skippin...' T: 21.3093543
L187 F101 ValueOne (P1): 10 Operator (P2): 0 ValueTwo (P3): 1 Variable (P4): LOOPCOUNT T: 21.3093543
L188 F70 Value (P1): LOOPCOUNT Comparer (P2): 5 To (P3): 12 Jump (P4): :LOOPSTARTLONEWOLF T: 21.3093543
L142 F139 Note (P1): :LOOPSTARTLONEWOLF T: 21.3093543
L143 F20 SetType(P1):1 Parameter(P2): VariableNam

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

Re: Help Getting Chocolatey for Automate Going

Post by Cubert »

I am reading through this now, give me an hour to read and reply.

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

Re: Help Getting Chocolatey for Automate Going

Post by Cubert »

How do we set all or some of the options we see if we add a package from Installed Software (Active, Install, Update) for the global apps?
The global approved apps list allows you to set options on how agents will be allowed to use package.

The Active setting tells plugin if we are allowing this package to be installed and or updated (currently) . You can right click package icon which opens a command window to enable (active) or disable (Inactive) the package once its in the package list.

The Install flag tells the plugin that it can automate the install of this package.

The Update flag tells plugin that it can allow agents to update this package.

There maybe cases where you will want to allow a package to update if it exists but not push the package to agents directly. There may also be a package you what to install but leave at its current version, in this case install with out update would allow you to do this.

I would include in your app list the following for install and update.


chocolatey
chocolatey-compatibility.extension
chocolatey-core.extension

When using Caching Sites you should consider any supporting packages you might need to also have so that your primary packages can complete install or updates successfully.


How do we know if it is currently set to install or uninstall globally - because if we click the icon beside the package in global, it defaults to 'remove application from list' - sure, we can see if it is enabled or disabled in the table, but what about the other options (install globally, uninstall globally, update, or active... and is active the same as enabled)?

I may have answered this in the previous question, There is no uninstall globally setting to manage,. It is allow install and allow updates. You can not modify these 2 setting after setting them. You would need to remove package and readd it with updated settings. We do how ever allow you to enable and disable it via control.


The Application [7zip.install] is set to ignore updates and installs or is already current, skipping app updates.

So, which is it? I'm assuming the green under 'enable' means it is set for auto updates?
I am going to describe the automation process so I can better explain how the Automation script comes into play and how I troubleshoot issues. Since Automate is a highly configurable environment some environments react a little different from others and so there maybe small difference that make larger impacts to deployments. Explaining how I get from A to Z may help someone identify issues more easily.

The plugin hooks into a Automate Sync service that the DBagent operates. This sync service is an automate process and runs twice daily (12am and 12pm to 1 pm typically depending on host/loads/etc). This gives the plugin 2 windows of automated operation in which we will schedule a script to do some functions needed by plugin. This does not effect any manual operations plugin may perform.

We do auto updates (checks for plugin updates) at 12 am along with agentSync and then again at noon another agentSync. This means if plugin require updates it will update otherwise the agents enabled will sync at 12 am and then again at noon/1 pm.

When a script is scheduled on an agent it is passed a parameter, you can see this parameter in the script schedule log. This allows us to see what function in script is being called. We can then go into this script and follow the logic through the script function.


Screenshot 2023-08-10 104525.png
Screenshot 2023-08-10 104525.png (19.28 KiB) Viewed 61463 times






A typical script run should look like so:

Screenshot 2023-08-10 105502.png
Screenshot 2023-08-10 105502.png (64.69 KiB) Viewed 61463 times


If you select the view log link then it reports status of package its working on.

Screenshot 2023-08-10 105604.png
Screenshot 2023-08-10 105604.png (9.34 KiB) Viewed 61463 times


I am going to stop here with this post entry so if you are waiting for response that your not waiting for me to write a book.

I am still responding so expect a second post entry coming after this.

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

Re: Help Getting Chocolatey for Automate Going

Post by Cubert »

Part 2

Lets me walk agentSync and explain what it is doing.


When we come into script at line 1 we query database to see if agent is caching or standalone (lonewolf) and if lonewold we jump to line 138 {executelonewolf} which brings us to the following image.

Screenshot 2023-08-10 112425.png
Screenshot 2023-08-10 112425.png (67.39 KiB) Viewed 61450 times

On line 140 we query for all enabled approved packages from global list and on line 142 we start looping through each result we received. So from line 142 on we will see this loop repeat for each package we have in query. We define and then set several data values from SQL query into script variables before proceeding . This is done on line 143 through 152.

Now that we have all the data sorted for one package in the loop we test that packages "app name" against the agents known installed software list. This is a list that automate has generated from probing the Installed software on agent. If we get a hit on query then the APPID will be some number above the number one which means we have a natively installed software for Chocolatey to try and manage. You will note that I said try to manage, I will give some reason why this may fail a little later. So lines 153 to 158 tests the APPID to make sure it is valid. If valid and matching it will LOG that it found software in line 159 and move on to line 160 else if invalid (not found) it will skip trying to "update" a non existent package.


Screenshot 2023-08-10 114436.png
Screenshot 2023-08-10 114436.png (102.54 KiB) Viewed 61450 times


At line 160 we try to insert the new found application for the agentID into the database and if it already exists we update that record. Next we query the same record and test to see if previous version and current version are the same.
If versions differ then if will fail the two tests and will continue to line163 where we execute the chocolatey update and complete the blending of Chocolatey app with a pre-existing app installed outside of Chocolatey.

The the loop continues repeating these steps until all approved packages are delt with.


In your logs it looks to be hitting the line 162 were versions are tested and they are equal. This causes a jump to line 185 that logs the skip and tests to see if loop should continue.
L160 F67 Sql (P1): 'INSERT INTO `plugin_p4a_chocolatey_agent_apps`(`ComputerID`,`ClientID`,`SoftwareID`,`AppAs...' T: 21.2469282
L161 F117 Sql (P1): 'SELECT count(*) FROM plugin_p4a_chocolatey_agent_apps WHERE AppAssocID = '2' and ComputerI...' T: 21.2624858
L162 F117 Sql (P1): 'SELECT count(*) FROM plugin_p4a_chocolatey_agent_apps WHERE AppAssocID = '2' and ComputerI...' T: 21.2624858
L185 F139 Note (P1): :SKIPAPPUPDATELONEWOLF T: 21.2624858

Screenshot 2023-08-10 115558.png
Screenshot 2023-08-10 115558.png (25.87 KiB) Viewed 61450 times

So in the logs you supplied we are see what looks to be several packages being skipped as they are already "installed" and are up to date. This also means they should exist as entries in plugin_p4a_chocolatey_agent_apps table in the database with values (`ComputerID`,`ClientID`,`SoftwareID`,`AppAssocID`,`LastUpdate`,`PreviousVersion`).

Up above I mentions the word "TRY" and said I would explain in more detail. The reason I used the word try was that there are some cavoites one may experience when working with Chocolatey. Here are 2 common issue we see time and again that hang people up.

#1 Chocolatey supporting software. Chocolatey has several helper apps that are not installed by default when installing Chocolatey.

These are:
chocolatey-compatibility.extension
chocolatey-core.extension
These packages help Chocolatey install packages like Google Chrome which may fail to install if not present. These are optional packages so do not get installed with chocolatey. This is why our suggestion is to make sure these are added to your approved software list. Agents will be told to get these during a normal install run.

#2 Select the proper chocolatey packages for your installed software. I will give an example here.

Lets say you want to install and upgrade WinZip. You add The App Name "WinZip" along with the package name "winzip" to the approved packages list. The script sees that WinZip appears in the installed software list for agent so now executes the Chocolatey upgrade winzip on agent and installs Chocolateys Winzip version.
On the very next run it repeats and again finds WinZip and version but version is still old version and again tries to update winzip. Why?

The main reason for this is the Winzip package you selected to upgrade with. If you were to go to chocolatey.org and search Winzip packages you would find that there are multiple packages for winzip.
There is a "winzip" and there is a "winzip.portable" and there is also a "winzip.install". 3 packages for the same version of Winzip. The correct package to use would be the "winzip.install" as this Winzip install/update will act upon a normal windows installed Winzip where winzip and winzip.portable place all files in directories shimmed from Chocolatey. Thus you are now installing 2 separate versions of winzip and Chocolatey is trying to manage both, succeeding locally but failing the installed version.

So a few things to be aware of that will help you better process software updates.

I still have more to go over so I will create a 3rd post here to continue my thoughts.

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

Re: Help Getting Chocolatey for Automate Going

Post by Cubert »

Part 3

The above describes the update and package association process, next I will describe our second hook.

The plugin hooks into another DBagent process that runs every 10 times per hour. During each 6 minute window we test to see where on the hour we are and if we are with in our sub windows we test and execute scripts against agents.

Here are the timings:
#1 if subwindow is between 12-18 minute mark (3 run for the hour) we test for agents missing framework and deploy chocolatey. If all agents have chocolatey then we do nothing. This runs every hour testing for new agents to show missing Chocolatey on enabled agents.
#2 if subwindow is between 0 and 6 minute mark (1st run for the hour) and Hour = 4or16 Run CacheApps script function
#3 if subwindow is between 0 and 6 minute mark (1st run for the hour) and Hour = 10or15 Run VersionChecks script function
#4 if subwindow is between 0 and 6 minute mark (1st run for the hour) and Hour = 6or18 Run master versioning script function

This allows us to distribute automated tasks over a 24 hour period making sure that as new agent activity happens that the plugin is able to respond to agents. Not every enabled agent will receive these commands, some commands are sent only to caching agents so may not apply to mass of agents.


All these functions can be found in the else section of the Chocolatey Automate script.


As part of this review, I have come across what would be considered a bug or better put a growing pain.
Chocolatey as of version 2.1.0 is now doing their list local install apps without the "--local" switch. They have discontinued that switch which cause an error during a scan for versions. I need to add in a test for currently installed chocolatey version and if 2.1.0 or newer we change the command. This may explain why your chocolatey lists are incomplete. You can test this by getting the version of chocolatey from agent and seeing if its 2.1.0+ if so you have the issue on that agent.

I will get on this asap and get a fix out today. This is truly my fault as I knew this existed and was coming down from Chocolatey. I had already coded for it in our RMMmax.com version of plugin and plum forgot to push out updates in this plugin.. I apologize for the tardiness.



I'll post here when update is released. Sometime later today.

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

Re: Help Getting Chocolatey for Automate Going

Post by Cubert »

Here is the updated release, when you update your plugin, make sure to restart the DBagent. Afterwards verify that the newest version of the Chocolatey For Automate Service script is now 3.5.0.12 as well. Then allow 24 hours for it to manage agents and see if that updates the views correctly.

The main change is we now test chocolatey versions and call correct version list command based on chocolatey version.

Build 3.5.0.12
https://delivery.shopifyapps.com/-/6ac9 ... ba26354c1d

PL-MSTech
Posts: 47
Joined: Mon Jul 31, 2023 10:07 pm

Re: Help Getting Chocolatey for Automate Going

Post by PL-MSTech »

1. Looks like my plugin is already at 3.5.0.12 from my original purchase/install, but I went ahead and updated it to the version in the link.

2. So if the following is so important in many common cases (like chrome being updated), why aren't these included in the default plugin?

I would include in your app list the following for install and update.
chocolatey
chocolatey-compatibility.extension
chocolatey-core.extension

3. How do we add these? As regular packages? If so, what is the recommended Search/Package?

Thanks

PL-MSTech
Posts: 47
Joined: Mon Jul 31, 2023 10:07 pm

Re: Help Getting Chocolatey for Automate Going

Post by PL-MSTech »

Bump?

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

Re: Help Getting Chocolatey for Automate Going

Post by Cubert »

Correct add them and enable them as approved packages, I typically name them the same name as the package. These are chocolatey extensions so will not show in installed software list so has no need to match anything.

PL-MSTech
Posts: 47
Joined: Mon Jul 31, 2023 10:07 pm

Re: Help Getting Chocolatey for Automate Going

Post by PL-MSTech »

Ok... this look correct?
choco extensions
choco extensions
choco-ext.png (12.12 KiB) Viewed 61295 times
So, I am assuming that if it has already been installed, this will update or overwrite the current version and keep it current?

Thank you!

Locked

Return to “Chocolatey For Automate”