LabTech – Chocolatey NuGet II Plugin

On June 7, 2015, in Projects, Scripting, by Cubert aka (Cube Dweller)

logo

 

Squidworks Chocolatey II Plugin General Beta Release

 

Chocolatey NuGet is a Machine Package Manager, somewhat like apt-get, but built with Windows in mind. It was designed to be a decentralized framework for quickly installing applications and tools that you need. It is built on the NuGet infrastructure currently using PowerShell as its focus for delivering packages from the distribution repositories to your computer.  For more information on the Chocolatey Repos and Applications please visit https://chocolatey.org/about

There are 3 fundamental places to manage Chocolatey II.  Globally, at the Client level and at the Computer level.

 

The Global Level – View Main Menu – Chocolatey II

The Configuration Tab:

 

mainview-config

 

At the global level you can control the applications you want to approve for auto installs and auto updates. Using the controls you can add as many packages as you like which will make them available to any client PC. You can control whether or not to auto install, auto update and exclude or include Windows servers.

 

 

The Exclusion Tab:


globaltab-exclude

 

 

Using this tool you can control by client who gets a global exclude from application installs. This area only allows you to flag machines inside a client at the time you apply the exclude. If a new machine is added to client after global exclude is applied then that system will not be excluded and when you return to this page they client will no longer be checked as fully excluded. Reselecting the client will reset all systems including the new ones back to excluded again. If a machine is removed from the exclusions then it will also cause the client to show unchecked. Any system allowed to install software at a client level or system level will override the global exclusions here and will remove the check for client here in the global exclude area.

 

Client Console

Client Configuration Tab:

 

clienttab-config

 

 

The client console Chocolatey II tab allows the admin the ability to exclude the Client for auto installs of software. You can exclude all applications for install or updates and you can exclude any number of packages directly without excluding them all. This allows you to fine tune what applications are distributed to the client PCs.

When selecting to exclude an application at the client level it will force all PC under client to exclude the application. If you then go into a computer console and un-exclude that application then it will receive that app in less than 10 minutes. If you return to the Client Console Tab the application will no longer show as excluded because at least 1 PC under client is getting it. All other PCs will remain excluded from installs.

 

Client Systems Tab:


clienttab-systems

 

 

This tab allows you to manage the software installed at the client level. You are presented with a list of systems and each application installed on that PC. From here you can launch an update or uninstall the applications across the client. A terminal window is provided to you can monitor live the request being sent to system and the responses sent back from the end system.

 

Computer Console – Chocolatey II Tab

Configuration Sub Tab:

 

computertab-config

 

 

This view shows what approved apps are available to the PC level and allows the admin to exclude any of the packages from auto install. There is also the ability to exclude from all installs and to exclude updates.

 

Computer Console – Chocolatey II Tab

Software Sub Tab:

 

computertab-soft

 

 

This view allows the admin to see what is actually installed on PC currently and to uninstall or update the packages manually. We also added the ability to manually install any package “not” in the approved list for those one off application installs.

 

 

Chocolatey II has been redeveloped and can now be found here.

 

download

 

 

Enjoy the Plugin

Cubert

Tagged with:
 

52 Responses to “LabTech – Chocolatey NuGet II Plugin”

  1. Michael says:

    Looks great!
    A few questions:
    – what’s the upgrade process from previous versions of the plugin?
    – any way to add a custom repo?

  2. Custom Repo is coming and is slated for near future,

    As for upgrades you select to allow auto upgrades then a daily check for upgraded is done via the Choco application.

    We have a lot of things planned as we move forward but the first is to get this thing hardened up and out there for the masses to play with.

  3. Michael says:

    Sorry, I should have been clearer on the upgrade question:
    If one has Chocolatey plugin v1.x already implemented, what’s the correct way to migrate to the “II” version?

  4. Version 1 and 2 are independent of each other, the current packages will not be autoloaded back into the system from version 1 but you are able to add the new packages and old packages to the repo and approve them. if the software is already installed on the client it will just add it to the database so that the new plugin is current.

    So long answer short, add any pre installed apps to the approved apps list and let the plugin sort it out.

  5. Ben says:

    Awesome! Looks Great! Quick question…If I open up a computer and go to the Chocolatey II tab, then select the software sub-tab, none of my configured applications are listed there. This may be by design, but I was thinking it was a way for me to be able to manually install an application on demand, derived from the list of applications added at the global level.

    I guess what I’m wondering is if the plugin provides the ability for me as the Labtech Admin to define a list of say 30 applications that we deem “approved” for our engineers to install on customer systems, then my engineers can simply open a computer that requires app installation and select any one of those 30 applications to install on demand for that particular computer?

  6. Cubert says:

    not yet, but that why we run a beta program. To get user feed back to make the plugin better.

    I will add that to the next release candidate as that is a good idea.

  7. Cubert says:

    Looks like we found our first bug, It looks like on some systems that during the first installs, the plugin issues the CHOCO install after a app install instead of the other way around. This is causing apps to fail to install for some systems.

    If you run the manual updater then this will force a reinstall of that app.

    We are working on this and will release a new beta ASAP.

  8. Aaron says:

    Issue found when in Global Config | Global Excludes
    selecting All Client, when attempting to check box I get the following error:

    Cleint excluded error = startIndex must be less than length of string. Parameter name: startIndex

  9. Aaron says:

    seems this Cleint excluded error = startIndex must be less than length of string. Parameter name: startIndex is happening any time I click on any check box in the global exclude list.

  10. Cubert says:

    Hmm..
    Ok let me look at that.

  11. Yeah, I’m running into the same problem as Aaron, Cubert. I should note we’re on Labtech 10.

  12. Aaron says:

    Paul,

    Just tested this issue on Beta.4 and it is resolved. Working like a charm now.

  13. Still not working for me in beta 4 after verifying I’m running beta 4 (2.0.0.330, but it seems to be a new error. The following message pops up 3 similar messages in order:

    Global Config Read Error -> Object reference not set to an instance of an object.
    Application Approval Error -> Object reference not set to an instance of an object.
    Application Installed Error -> Object reference not set to an instance of an object.

    Thanks!

  14. That is due to your console not being restarted..

    install the DLL, restart the DBagent on LT server and close and restart your LT console and all will work fine..

    The console during updates and installs will blow up after the plugin has been installed with those exact errors.

  15. Ah! That makes sense. I gave it a whirl and all is seemingly well in the world.

  16. Ben says:

    Just curious as to wether these plug ins work in cloud based LabTech environments. I tried the flushot one as well as surf log and would like to try this but they all give me errors.

  17. Michael says:

    Last I checked cloud-based LabTech does *not* support plugins. It also doesn’t support direct access to the database or a bunch of other “under the hood” stuff. This was a deciding factor for us choosing the on-premise version. You’ll also find that the per-seat cost of the on-premise is *much* lower than the cloud cost.

  18. Ben says:

    Hello and thanks for your reply. I actually got lucky on the phone with support today and got Chocolatey II, Flu Shot and Surf Log working with their assistance while working another issue. Sometimes it’s just how you ask with them and who you get.

  19. Michael says:

    @Ben – this may have changed with the new v10. When we were deciding the cloud platform was still 2013 and we were also still in demo mode when we asked.

  20. Cubert says:

    Yest the plugins do work, some require files in the correct places for download by scripts when run which was what caused your FluShot to fail for you but the new Chocolatey II uses no external scripting so should work well out of the box.

    Keep in mind you must restart the DBagent on the LT server before using the plugin.

  21. Cubert says:

    Micheal,

    We actually provide a cloud plugin for working directly with SQL and is great for passing queries to the backend SQL server.

    Give it a try..
    http://www.squidworks.net/2015/04/labtech-plugin-sql-query-analyzer/

  22. James says:

    In beta4, it looks like the applications are not populating properly at the computer level on the software tab. I haven’t verified, but it looks like all of the configuration tab applications are populating properly at the same level.

    So far it looks great. What would be awesome is if there is a way to import a list of common applications used. This would save a ton of time having to look up the application names and commands.

    Great Work!!

  23. Beta 6 is now out and has fixed most everything..

    Added a importer to import common applications, This is a list in progress so if you think some app deserves to be on the Approved apps importer then list them here.

    Also fixed all the popup errors currently seen in version beta 5 and older.

  24. Michael says:

    @James/Cubert – not sure what the importer does is meant to do. Does it look through the existing apps on the client PC and add the known ones to the list of things it knows are installed (and might need updates)? I.e. is this to avoid the “reinstall something we already have just so Chocolatey knows about it” phenomenon?
    Or is this a way to build your own (customized) apps list?
    Or something else?

    (Enquiring minds and all that.)

  25. James says:

    Importer worked great. Is there any way you can make the list sortable by name or command. I found that the list created duplicates, but the column header was not sortable on the list view. It would help to ensure you do not have duplicates.

    Also, at the computer level, the Software Tab is still not populating all of the applications that I have installed that are on my approved upgrade list. Google Chrome, Putty, Evernote, etc…. They are all in the approved upgrade list on the configuration Tab but not available to upgrade from the Software tab. Thoughts? Is this potentially an issue on my end?

  26. James says:

    @Michael-The importer was just a quick way of injecting a bunch of ‘default/commonly used’ application commands into the Approved Install/Upgrade list. Previously you had to build this list one entry at a time. Now, it starts you off with a handful off entries that are commonly used.

    You can still add entries manually and do not have to use the import feature, it was merely for a quick start on the new plugin.

  27. Michael says:

    @James – thanks, that clarifies it!

    However, after running it for a few months we’ve decided to remove it entirely and go back to just doing our own scripting for updates for the simple reason that we keep getting bundled crapware with the Chocolatey updates. They either trigger the AV (which then prevents the update), or in the case of McAfee getting installed along with an Adobe patch as happened just a couple of days ago, it causes conflicts. Dealing with this stuff is turning out to be as much work as is otherwise saved, and there’s a measurably greater level of risk involved, so… :/

  28. That can happen when using the general repos, I believe they have a more strict set of guidelines for the PRO versions and repos. I will be adding the ability to add and or change the repos you connect to for software so that you can host your own repos and or use repos that you trust more.

  29. Rob Reynolds says:

    @Cubert I’m not sure what is going on, but I just released 0.9.9.8 in response to a recent issue with the labtech plugin accidentally exploiting a flaw in choco 0.9.9 series. See https://github.com/chocolatey/choco/issues/341 and https://gitter.im/chocolatey/choco?at=558b84c638e37bf74261d3bd for details.

    Anyway, please encourage everyone to immediately upgrade to 0.9.9.8 of choco if you can.

  30. Rob Reynolds says:

    @Michael – with respect to choco packages and downloading the installers with crapware – even though they have that, almost always the silent install keeps that from installing. and in some cases the package maintainers have went extra steps to ensure that crapware is not installed. If you find any packages that actually install crapware, we’d like to know (at the very least a comment on the disqus thread on the package page) so we can take steps to correct it with the maintainers.

    Typically we recommend businesses maintain their own internal package repos where they’ve vetted the packages, installers, etc.

  31. Michael says:

    @Rob – completely agree, that wasn’t meant to be a slam on Chocolatey at all. It’s strictly an issue with the Labtech plugin not allowing other repos to be specified and it sounds like that is in the roadmap, (woohoo! 🙂

  32. jh says:

    Is the functionality from Chocolatey v1 gone? In the original version i could go to a machine and click the ‘install chocolatey’ button and then single click an application and it would install.

  33. Rob Reynolds says:

    @Cubert I’m not sure what is going on, but I just released 0.9.9.8 in response to a recent issue with the labtech plugin accidentally exploiting a flaw in choco 0.9.9 series. See github.com/chocolatey/choco/issues/341 and gitter.im/chocolatey/choco?at=558b84c638e37bf74261d3bd for details.
    (links removed so this doesn’t go to moderation)

    Anyway, please encourage everyone to immediately upgrade to 0.9.9.8 of choco if you can.

  34. Chocolatey V1 is still available and works just fine, Chocolatey II is more of a global policy manager for LabTech to install and update application you have added to your Approved Apps list. Slightly different takes on the same process. Pick your poison!

  35. Anyone using Chocolatey should read this…

    https://github.com/chocolatey/choco/issues/341

    We have had a report that someone has experienced this bug and ended up with some failed systems because of it.

    There is a bug in version 9.9 series that causes Chocolatey to want to clear a directory that it executes from in some cases. Since LabTech Agent runs as system and is rooted in C:\windows this may cause Chocolatey app to try to zero out the directory it was in during a install from what I can gather from the URL above. It is highly suggestive that you update chocolatey if possible.

    Everyone should immediately upgrade to 0.9.9.8 of choco if you can. To do this ether turn on Auto Updates which will cause everything to update including the Choco app or manually visit each Client console and select the software tab in the Chocolatey II plugin and click update on each system that has chocolatey installed.

    If you have Auto update already turned on then you should be at the latest choco already. Please verify by running choco -v at the cmd prompt for conformation.

    Thanks to Rob Reynolds the Developer of Chocolatey for his response to this issue and for alerting Squidworks to this issue in a very timely manor. The Choco Team is Awesome!!!

  36. Scott says:

    I have installed the plugin, added some basic packages, and then globally excluded every client except ourselves so we can do some testing. We are seeing that even when exempted, this plugin is running ‘choco.exe upgrade all -fvy’ on our client endpoints and upgrading anything available.

  37. Cubert says:

    That was originally by design but we found that is not very effecient nor does every MSP want the framework deployed across all PCs.

    That is coming out and in place will be a process to deploy Choco once the first package is enabled for a pc or client.

    This will be fixed in coming betas, I hope to get out of beta by years end. Keep sending us ideas for improvements.

    Thanks Cubert

  38. Ben Perkins says:

    Major Major issue. Attempted to exclude all clients except for us for testing in Labtech. Somehow the checkboxes reset and when I was trying to test the adobe reader install, it attempted a deletion of c: from ALL endpoints. Please tell me there is a fix for this!

  39. Scott says:

    I’m pretty sure checkboxes resetting is on purpose, I found that after saving, it disables each client at the client level.
    Unfortunately, we did have it push out the adobe reader update to every computer – this was quite a mess.

  40. Ben Perkins says:

    Hey Scott, any viable solution you came up with other than format and reload over 200 endpoints?

  41. Rob Reynolds says:

    I urged Cubert to write a post and I mentioned that the issue was found due to a bug in the labtech plugin – see the comments above on June 30th (original was posted earlier but it is still waiting for moderation). I am not sure if he followed up with a post and a fix to the plugin though. Please see github.com/chocolatey/choco/issues/341 and the original report at gitter.im/chocolatey/choco?at=558b84c638e37bf74261d3bd

  42. Rob Reynolds says:

    Also Scott and Ben, we released a fix with choco 0.9.9.8 within about 24 hours after this was reported.

    I wouldn’t trust anything less than 0.9.9.8 with the LabTech plugin.

  43. Scott says:

    I did see the post for the choco update and made sure we were at the newest. I still had the issue with adobereader installing everywhere.
    I did not run into the problem with the attempted deletion of C:

  44. Cubert says:

    @Rob – And we did post both here http://www.squidworks.net/2015/06/labtech-chocolatey-nuget-ii-plugin/comment-page-1/#comment-16303

    and on the LabTechGeek thread for Chocolatey II.

    @All
    This was not a bug in the plugin but due to the way LT agent can execute basic commands allowing choco to be executed as system with a home dir of C:\windows. The process in choco that deleted files was in versions of choco prior to 9.9.8. Everyone is urged to update choco to that version prior to using plugin.

    @Scott

    As for the enablers, we do have in beta 6 an issues where if you add a new package after setting all clients to disabled that the new package is not added to the disabled lists for each system so the client as a whole is then seen as not “fully” disabled. If a client is not “Fully” disabled then he is enabled.
    All systems that were set to be disabled are still disabled but any new changes are enabled.

    That is an issues we are resolving in Beta 7 which we have yet to release.

    The work around in the mean time is, during any change to the global environment like adding of new agents or adding of approved apps be done while the master on / off switch for installs is off. Then before turning back on reselect the clients to disable to makes sure all new packages added get added to disabled database. then when you are comfortable that the correct clients are disabled/enabled turn on the auto installer.

    Again this is a Beta Application and is a work in progress. Beta 7 will be addressing many issues we have found thanks to the response of the beta users. The new beta 7 will be a be big step forward in stability and functionality.

  45. I haven’t tested this yet, but its on my todo list, just have a few queries/suggestions.

    Our support is based around servers rather than client PCs, and I am manually running chocolatey updates on all our RDS Servers, With this plugin, can you add a way to run the updates in install mode, “change user /install” and then on completion of updates “change user /execute”?? An if we are really ambitious, a log all users off pre script command also? ( I run these scripts on Saturday nights when no one is supposed to be on.

    I imagine it would be an easy feature to add, based on autodetecting the server role.

  46. Ben Perkins says:

    If anyone else runs into this issue, we found a much better fix than reloading everything. Boot the effected machines to a windows 2 go type of portable windows install. Log in as admin. Use Shadow copy and pick a restore date prior too the issue. The only effected directory really seemed to be \Windows as all user data and program data appeared to be intact. After you extract the Shadow copy, copy the Windows directory minus the temp and sys32 folders and skip any of the same files. Then copy the sys32 folder over top of the sys32 folder of the effected machine. This was successful 90% of the time and all that was left were a few domain trust issues.

  47. We have a new update for you, please visit

    http://www.squidworks.net/2015/08/2079/

    For our Chocolatey II pre announcments

    Cubert

  48. Chris Benjamin says:

    There seems to be an issue with command execution path. It seems to be executing under the root of C:\ which gives an error that Choco.exe doesn’t exist. Is there a fix for this in Beta 6?

    Beta 6
    Parameters: cmd!!! /C choco.exe install -fvy malwarebytes
    Output: ‘choco.exe’ is not recognized as an internal or external command, operable program or batch file.

    Chocolatey Version 1.1.2 it worked and executed under Program Data
    Parameters: cmd!!! /C C:\ProgramData\chocolatey\bin\choco.exe install -y javarunti
    Output: Chocolatey v0.9.9.8
    Installing the following packages:

  49. @Chris,

    We have now soft released Chocolatey II Build .155 available at http://chocolatey.squidworks.net This is now the official release.

  50. We just released build 211, fixes a bunch of stuff and adds many new items to the plugin.

    Very cool stuff.

Leave a Reply