limp15000 7 Posted January 23, 2018 Share Posted January 23, 2018 (edited) Hi all, So with all the different security issues around Intel I thought this was really the time to focus on finding a solution to deploy drivers and possible firmwares in automated fashion. Goal was also if possible to be able to use this for customers without Automate. Like everyone I started googling to find information in december. By chance I stumbled on a post in january pointing me in the right direction. HP Softpaq Download manager has command line switches which you can see if you press CTRL + SHIFT + Y when the program is running. Then quickly tried to through a script together which was failing without giving an error. @DarrenWhite99 pointed me to one of his comments which was very helpful : Long story short when HP SDM is run from SYSTEM it will try to download to the TEMP environment variable which points to c:\users\blabla\appdata\local\temp which you guessed it doesn't exist when in the system context. Once you set the variables the tool works as expected instead of closing without downloading and without giving an error message. Now my other issue was that the categories and priorities are not always what you would like. Fortunatly that is easy to fix. When you edit HP SDM's configuration it will change the Defaults.sdm file (which is XML). This allows you to specify the guest OS and drivers you will be targetting with SDM. Testing was quite successful on computers in our office and on customer sites. https://github.com/limp15000/ConnectWise-Automate-HP-Driver-Update Edited March 2, 2018 by limp15000 1 Quote Link to post Share on other sites
Joe.McCall 22 Posted January 23, 2018 Share Posted January 23, 2018 This is awesome. I had looked into automating SDM a while back and I had not figured out how to exclude the bloatware. Will be testing this out! Quote Link to post Share on other sites
limp15000 7 Posted January 25, 2018 Author Share Posted January 25, 2018 I've fixed a small glitch in my install script. Also added the search we use to autodeploy SDM on HP workstations. Will also upload a modified version of @SteveIT BIOS install script which leverages SDM and the EDF. Quote Link to post Share on other sites
limp15000 7 Posted February 7, 2018 Author Share Posted February 7, 2018 After some extensive tests I am now pushing to prod in our company today. If no issues arrise will push to all client workstations. Quote Link to post Share on other sites
BlueToast 20 Posted February 19, 2018 Share Posted February 19, 2018 By chance I stumbled on a post in january pointing me in the right direction. Link to said post? Quote Link to post Share on other sites
limp15000 7 Posted February 21, 2018 Author Share Posted February 21, 2018 Here is the link from technet. https://social.technet.microsoft.com/Forums/de-DE/54231a86-56a8-444b-8601-c9a859d4db0f/anyone-else-working-with-hp-softpaqbased-driver-files?forum=mdt Quote Link to post Share on other sites
limp15000 7 Posted February 28, 2018 Author Share Posted February 28, 2018 New version of HP SDM. And if autoupdate is ticket this will break my script. Updating script with new versions. I've also unticked the autoupdate in my SDM settings and pushed this to all computers. No wonder my report wasn't working anymore. Of course HP didn't yet bother to update the links on their site. Quote Link to post Share on other sites
MidbossQ 0 Posted March 1, 2018 Share Posted March 1, 2018 This is something we are looking at now very interesting I assumed they were going to have a tool for this but I guess not. Thanks for the script! Quote Link to post Share on other sites
limp15000 7 Posted March 2, 2018 Author Share Posted March 2, 2018 Scripts have been updated on github ! Also added a script to push a BIOS password. Quote Link to post Share on other sites
Joe.McCall 22 Posted April 19, 2018 Share Posted April 19, 2018 (edited) If you want to use a remote monitor to check for updates, I worked this method out this afternoon. Call it from a remote monitor using EXE monitor with command. Caveat is that this only works if the IE first run wizard is disabled, which can be done via group policy or via the registry. Reg add "HKLM\Software\Policies\Microsoft\Internet Explorer\Main" /v "DisableFirstRunCustomize" /t REG_DWORD /d "1" /f "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -ExecutionPolicy Bypass $ErrorActionPreference = 'SilentlyContinue';$response = Invoke-WebRequest -Uri 'http://ftp.hp.com/pub/caps-softpaq/cmit/HP_SDM.html';[string]$elements = $response.AllElements | Where-Object {$_.tagName -like 'H3' -and $_.innerText -match 'VERSION'} | Select -First 1 -ExpandProperty innerText;$latest = $elements -replace ('VERSION ', '');if($latest -notmatch '^(\d+\.\d+\.\d+\.\d+)$'){$latest=$latest+'.0'};$dir = (${env:ProgramFiles(x86)}, ${env:ProgramFiles} -ne $null)[0];$path=$dir+'\HP\HP SoftPaq Download Manager\SoftPaqDownloadManager.exe';$v=(Get-Item -Path $path).VersionInfo.FileVersion;$v.Equals($latest) Edited May 8, 2018 by Joe.McCall Updated the powershell on the remote monitor to fix false positives; version 4.4.0 file version is 4.4.0.0, like the previous 4.3.23.0 version, so I added a regex match to make sure the web version is in format 0.0.0.0. Added missing logic for x86/x64. Quote Link to post Share on other sites
limp15000 7 Posted April 23, 2018 Author Share Posted April 23, 2018 Interesting Joe. Unfortunately last time they updated SDM it took them 2 or 3 weeks to update that site But my script stopped working the same day because it was seeing the new version and quitting. I have removed the version check in the SDM settings. Quote Link to post Share on other sites
Joe.McCall 22 Posted May 8, 2018 Share Posted May 8, 2018 (edited) Thanks again for your work on this! I took the latest batch of scripts and ran with those to build out a solution for on-demand and monitor-based functionality for our system, so I wanted to share them back here in case anyone else finds any of the changes useful, or if there's anything you want to incorporate into your script set. I broke out the downloading, configuring, and installing into function scripts. I had really mixed results using SDM to download updates, and it was not ideal for clients with limited bandwidth, so I worked out a powershell script to parse the SoftpaqReport.csv and then cross-reference ProductCatalog.xml to extract the download URLs directly and then run a loop to download each with GetLTFile, making it LTCache compatible. My version of the report script puts a condensed, comma-separated list into the EDF and generates an HTML table for the email. I updated the BIOS update script to support hpqflash and incorporate an .HTA based splash screen (based on tlphipps Windows 10 splash here) that takes over the primary screen if the system is logged in. I've only been able to test on an 800G1 so it may need additional tweaks to support other, newer variants. I also updated my remote monitor powershell this morning with a minor tweak to add some regex checks -- version 4.4.0 on the website dropped the last .0, so I was getting a lot of false positives as the file version is 4.4.0.0 -- the monitor accounts for this now and adds .0 if it's short. HP SDM Scripts.pdf HP SDM Monitors and Monitor Scripts.pdf HP SDM Scripts.zip HP SDM Scripts.zip Edited March 5, 2019 by Joe.McCall 3/5/19 -- Updated scripts with improved BIOS update script, support additional models. Quote Link to post Share on other sites
limp15000 7 Posted May 9, 2018 Author Share Posted May 9, 2018 Wow awesome, will definitely take a look. Thanks for sharing back :) Quote Link to post Share on other sites
Joe.McCall 22 Posted May 9, 2018 Share Posted May 9, 2018 Just uploaded a new zip file. My report script was referencing the wrong variable name and the function scripts did not take into account the possibility of Automates "OK" script timeout results, so it now checks after each Execute script to see if the variable equals "OK", if it does it re-runs and outputs to a txt file, sleeps the script for a minute, then reads the txt file back into the desired variable. Quote Link to post Share on other sites
Joe.McCall 22 Posted May 10, 2018 Share Posted May 10, 2018 My update script had an issue when comparing versions before and after. I have re-uploaded with a fixed version. Quote Link to post Share on other sites
Joe.McCall 22 Posted May 14, 2018 Share Posted May 14, 2018 Here's a RAWSQL monitor query to find all machines with SDM installed that have a version less than the highest one in the database. SELECT DISTINCT software.Version AS TestValue, Computers.Name AS IdentityField, computers.computerid, computers.Name, CONVERT(CONCAT(clients.name,' ',locations.name) USING utf8) AS Location, agentcomputerdata.NoAlerts, agentcomputerdata.UpTimeStart, agentcomputerdata.UpTimeEnd FROM ((computers LEFT JOIN Locations ON Locations.LocationID=computers.Locationid) LEFT JOIN Clients ON Clients.ClientID=Computers.clientid LEFT JOIN v_extradatacomputers ON v_extradatacomputers.computerid=computers.computerid LEFT JOIN software ON software.computerid=computers.computerid JOIN agentcomputerdata ON agentcomputerdata.computerid = computers.computerid) WHERE software.name='HP Softpaq Download Manager' AND software.version<>(SELECT MAX(VERSION) FROM software WHERE NAME='HP Softpaq Download Manager') Quote Link to post Share on other sites
Joe.McCall 22 Posted May 17, 2018 Share Posted May 17, 2018 Updated the zip, attaching updated script here as well. SSM tries to push BIOS updates if they are found in the folder, so I had a small number of test users who came in this morning to a prompt for BIOS updates unexpectedly. Made a minor tweak to the powershell to have it exclude BIOS updates from the URL list, so BIOS updates will only occur if you run the BIOS update script. Function - HP SDM - Download All Drivers.xml Quote Link to post Share on other sites
ber 0 Posted May 29, 2018 Share Posted May 29, 2018 Thanks for sharing these scripts! I am wondering if you have experinced this error message when running Bios and specific driver download scripts. "C:\ProgramData\HP\HP SoftPaq Download Manager\SoftPaqReport.csv was not found" I can't figure out why it cannot see the csv file in the specified folder. When i use this exact file path it opens the softpaqreport on the computer i test the script on. It always fails on the "IF File Check" when checking the file path, it then tries to create a new softpaqreport.csv but it fails. Quote Link to post Share on other sites
Joe.McCall 22 Posted May 30, 2018 Share Posted May 30, 2018 On 5/29/2018 at 12:19 AM, ber said: Thanks for sharing these scripts! I am wondering if you have experinced this error message when running Bios and specific driver download scripts. "C:\ProgramData\HP\HP SoftPaq Download Manager\SoftPaqReport.csv was not found" I can't figure out why it cannot see the csv file in the specified folder. When i use this exact file path it opens the softpaqreport on the computer i test the script on. It always fails on the "IF File Check" when checking the file path, it then tries to create a new softpaqreport.csv but it fails. Edit "Function - HP SDM - Download Specific Softpaq" -- line 14 label should be :PullURL instead of :PullURLs, or import this fixed version. Function - HP SDM - Download Specific Softpaq.xml 1 Quote Link to post Share on other sites
ber 0 Posted May 31, 2018 Share Posted May 31, 2018 You are an angel! Many thanks! 😃 Quote Link to post Share on other sites
Joe.McCall 22 Posted June 7, 2018 Share Posted June 7, 2018 (edited) Updated ZIP file attached. Also updated in my original post. I have added some additional logic to a few of the scripts to ensure that the Settings.xml and Default.sdm file are correctly set prior to running the report function. I am also including the internal RAWSQL monitors that I am running. PDF documents included in the .zip give a breakdown of each monitor and script. Monitors check for pending driver and BIOS updates, missing settings, outdated SDM, or if it has been >30 days since the last driver update check. HP SDM Scripts.zip Edited June 25, 2018 by Joe.McCall 6/25 -- Updated with latest scripts Quote Link to post Share on other sites
Joe.McCall 22 Posted June 25, 2018 Share Posted June 25, 2018 We ran into a few cases where the Default.sdm was reset or missing, so it did not pull in the customizations and category selections, which in turn led to garbage like IPM+ and Client Security Manager getting auto-installed, so I have updated these two scripts to include a failsafe in the powershell that builds the reports and generates the URL list to exclude the same categories as the Default.sdm files, just in case. Function - HP SDM - Download All Drivers.xml Function - HP SDM - Generate Report.xml 1 Quote Link to post Share on other sites
BlueToast 20 Posted October 23, 2018 Share Posted October 23, 2018 (edited) I wonder if HP is moving to replace SoftPaq Download Manager (SDM) with Image Assistant (IA). Check it out! Software http://ftp.hp.com/pub/caps-softpaq/cmit/HPIA.html Manual https://ftp.hp.com/pub/caps-softpaq/cmit/imagepal/userguide/936944-003.pdf - see pages 22-24 for command-line options An HP technician recently informed us that people are moving away from SDM to use IA. I gave it a test and it's far more simple, straight-forward, better documented, and easier to use than SDM. Additionally, it doesn't involve installing any software - it's portable. Edited October 23, 2018 by BlueToast Quote Link to post Share on other sites
Joe.McCall 22 Posted March 5, 2019 Share Posted March 5, 2019 Attached an updated version of my BIOS update script. It uses a PowerShell function to locate the BIOS update executable instead of relying on fixed path variables, which will resolve issues with various models that unpack with different folder structures. HP SDM - BIOS Update.xml 2 Quote Link to post Share on other sites
mikey090tx 0 Posted July 14, 2020 Share Posted July 14, 2020 @Joe.McCall I came across your post regarding the bios Update and the script that you configured to get this accomplished last year. Have you worked on a solution that uses the new HPIA tool from HP? I haven't explored the options using HPIA but figured that i could ask what others were doing to avoid trying to re-invent the wheel. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.