PowerShell Script to Create a Sysinternals Suite INF File Installer

PowerShell Script to Create a Sysinternals Suite INF File Installer

  • Comments 3
  • Likes

In my February 26, 2010 post I provided an updated INF file to install the Sysinternals Suite.  I also mentioned that I would try to update this more frequently in the future as the content of the Sysinternals Suite changes.  Well my free time being what it is, I have not had a chance to do that yet.  So instead I took to heart a comment left by Chris Sagovac that I make a script to create the INF file.

The PowerShell script (New-SysinternalsSuiteInstaller.ps1) attached below does the following:

  • Downloads the Sysinternals Suite web page and parses out the Updated date.
  • Creates a subfolder below the script folder named with the Updated date.
  • Creates an Extracted folder under the date folder.
  • Downloads the Sysinternals Suite Zip file in the date folder.
  • Extracts the contents of the Zip file to the Extracted folder.
  • Generates Install_SysinternalsSuite.inf in the Extracted folder.

The INF file has entries to create Start Menu shortcuts for the graphical programs and help files.  You can change the list of programs and help files that will have shortcuts by changing the entries in the $hashStartMenuPrograms and $hashStartMenuHelp hashtable variables in New-SysinternalsSuiteInstaller.ps1.

 

- Michael Murgolo, Senior Consultant, Microsoft Services, U.S. East Region.

Disclaimer: The information on this site is provided "AS IS" with no warranties, confers no rights, and is not supported by the authors or Microsoft Corporation. Use of included script samples are subject to the terms specified in the Terms of Use.

Attachment: New-SysinternalsSuiteInstaller.zip
Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • Thank you, Michael, your script is exactly what I had in mind!

  • Thanks for great script!  And cosmetic fix: please replace "`n" with "`r`n"

  • Thank you, Michael. This script is great!

    However, due to minor specification changes on the server this script has become unusable, I made a patch.

    --- New-SysinternalsSuiteInstaller.ps1 Wed Jun 20 02:07:06 2012

    +++ New-SysinternalsSuiteInstaller.new.ps1 Wed Jun 20 02:07:18 2012

    @@ -59,7 +59,7 @@

    $invocation = (Get-Variable MyInvocation -Scope 0).Value

    $scriptPath = Split-Path $Invocation.MyCommand.Path

    -$uriZipFile = "download.sysinternals.com/.../SysinternalsSuite.zip"

    +$uriZipFile = "download.sysinternals.com/.../SysinternalsSuite.zip"

    $uriWebPage = "technet.microsoft.com/.../bb842062.aspx"

    $regexPattern = "<p>Updated: (.+?)<\/p>"

    $userAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)"