• Home
  • Consulting
  • Contact Us
    • About this site
    • Contact Wayne
    • Media Room
    • Wayne’s Bio

SBSFAQ.COM

Supporting IT Pro's & MSP's since 2000

  • Blog
  • FAQs
  • Reviews
  • Downloads

Automating Security Patch checks using HFNETCHK – Calvin McLennan

April 16, 2002 by Wayne Small Leave a Comment

Files for this FAQ are in the Files section of the SBSFAQ website under the section “Automation”
Download and unzip the AUTOHFNETCHK.ZIP file into D:\HFNETCHK
install BLAT by copying BLAT.EXE to the WINNT\SYSTEM32 directory
modify BLAT.BAT for proper SMTP server names and sending account
run BLAT.BAT
verify proper setup by opening D:\BLAT-ERR.TXT
NOTE: Daryl uses LOCALHOST for the SMTP name – which is fine if you are running it directly on the SMTP server. As I wanted to be able to run this on any server in an site – I’ve left it as a more defined name. Use LOCALHOST if you can.
filename: BLAT.BAT
contents>————————
rem: replace smtpservername.domain with the SMTP server you are using
rem: replace sendasname.address with the account name you are using
rem: run this once to install BLAT
rem: results of this run can be found in D:\BLAT-ERR.TXT
blat -install smtpservername.domain sendasname.address > D:\BLAT-ERR.TXT
————————————————
HFNETCHK results from servername.domainname
————————
dump.txt) will give you the necessary patch level information, but I wanted to also have the current version of HFNETCHK being run, whether there is a new version available, and the version of the MSSECURE.XML file being used, and whether it was a new download. Later versions of HFNETCHK are to have the proper version info sent without all the extra capture code required – so the usefulness of this CMD file may be eliminated soon.
filename: HFNETCHK.CMD
contents>————————
rem: this file must be edited before use
rem:
rem: servername.domainname.txt must be replaced with the actual servername.domainname.txt file name
rem:
rem: recipient.address must be replaced with the actual recipient address
rem:
rem: Command file to run for status of server’s patch levels
rem: based upon Microsoft’s HFNETCHK utility – using MSSECURE.XML file
rem: requires BLAT command line mailer to be previously installed and tested
rem: BLAT requires access to an SMTP server to send mail through
rem:
rem: Once tested, create a daily scheduled run of this command
rem:
rem: make path to required files
D:
cd\hfnetchk
rem:
rem: date stamps the log file, /T calls for command line extensions
rem: single creates a new log file
date /T > netchk.log
rem:
rem: time stamps the log file, /T calls for command line extensions
time /T >> netchk.log
rem:
rem: run the HFNETCHK executable
rem: it will check for new version of itself
rem: it will check for new version of mssecure.xml file
rem: and download the new one if it can
rem: -v switch allows for verbose output
rem: -z switch stops check of registry, just does file inspection
rem: netchk.log is the capture file name
rem: 2>&1 sends the STDERR output to the log file for version capture
hfnetchk -v -z >> netchk.log 2>&1
rem:
rem: BLAT sends the log file to the desired recipient
rem: BLAT must be previously installed and tested
rem: the first file name is created specific to the server the command runs on
rem: the .txt file exists in the same folder
rem: -to address.name specifies the intended recipient
rem: -attach attachs the .log file to the email
blat servername.domainname.txt -to recipient.address -attach netchk.log
————————

Share this:

  • Click to share on Facebook (Opens in new window)
  • Click to share on Twitter (Opens in new window)
  • Click to share on LinkedIn (Opens in new window)
  • Click to share on Reddit (Opens in new window)
  • Click to print (Opens in new window)

Filed Under: FAQs Tagged With: Not SBS Specific, SBS 2000, SBS 2000 SP1, SBS 2003 Premium, SBS 2003 R2 Premium, SBS 2003 R2 Standard, SBS 2003 SP1 Premium, SBS 2003 SP1 Standard, SBS 2003 Standard, SBS 4.0, SBS 4.0a, SBS 4.5, Security

About The Author

Wayne has been working with Microsoft Server products in the SMB market for over 20 years. He has a passion for technology and been a Microsoft MVP for over 15 years. Read More…

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Search

Connect Online With Us

  • Facebook
  • Twitter

Reviews

Splashtop – Cost Effective Remote Control Software

September 22, 2017 By Wayne Small 2 Comments

Western Digital DL4100 NAS

March 3, 2015 By Wayne Small Leave a Comment

SBS 2011 Configuring Certification Guide (70-169)

August 7, 2012 By Wayne Small 4 Comments

Site News

Exchange Bug Stops Mail Delivery in 2022

January 2, 2022

Huge bug found in Intel CPU that could permit hackers to steal your data

January 4, 2018

Recent Posts

  • MS Exchange Zero Day and RemotePowerShell Disabling on Admin accounts
  • Setup changes for Exchange 2016 and Exchange 2019
  • Bluetooth Mouse and Keyboard Randomly Stop Responding
  • Exchange Bug Stops Mail Delivery in 2022
  • How to open and search extremely large text log files

Tags

Antivirus Backup Business Focus Cloud Computing Community Conferences Disaster Recovery Exchange 2010 Exchange Server Future Products Hyper-V Installation Microsoft Migration Patches Personal Rants SBS 4.5 SBS 2000 SBS 2000 SP1 SBS 2003 SBS 2003 Premium SBS 2003 R2 SBS 2003 R2 Premium SBS 2003 R2 Standard SBS 2003 SP1 Premium SBS 2003 SP1 Standard SBS 2003 Standard SBS 2008 SBS 2008 R2 SBS 2011 SBS 2011 Essentials SBS 2011 Standard Security Service Packs ShadowProtect SMB Community Software Software I use StorageCraft Training TrendMicro Troubleshooting Virtualisation Windows Server 2012 Essentials

Terms of Use

Privacy Policy

Copyright © 2023 · Magazine Pro Theme on Genesis Framework · WordPress · Log in