A blog with focus on experiences with the Windows Client operating systems…
RSS icon Email icon Home icon

  • Checking Win32 application runtime dependencies in Windows 10

    Posted on March 17th, 2017 By Andreas Stenhall + No comments

    There are new WMI classes in Windows 10 that can be used to collect software inventory. The information can be displayed using PowerShell. Also, there is a feature that inventories what framework or runtime an application is dependent on, for instance which version of .NET Framework or Visual C++ Runtime and it can even see if there are dependencies for OpenSSL. Imagine having these feature in place when the HeartBleed bug appeared a few years ago.

    Display all installed applications on a Windows 10 machine:

    Get-WMIObject Win32_Installedwin32Program | select Name, Version, ProgramID | out-GridView

    Display all apps and dependent frameworks on a Windows 10 machine for a specific application (replace the ProgramID in the filter section with another one from the above example), and make sure everything is on one row:

    Get-WMIObject Win32_InstalledProgramFramework -Filter "ProgramID = '00000b9c648fd31856f33503b3647b005e740000ffff'" | select ProgramID, FrameworkName, FrameworkVersion | out-GridView

    or to bake them together to get both the application name and associated frameworks:

    $Programs = Get-WMIObject Win32_InstalledWin32Program | select Name,ProgramID
    $result = foreach ($Program in $Programs) {
    $ProgramID = $program.programID
    $Name = $program.Name
    $FMapp = Get-WMIObject Win32_InstalledProgramFramework -Filter "ProgramID = '$programID'"
    foreach ($FM in $FMapp) {
    $out = new-object psobject
    $out | add-member noteproperty Name $name
    $out | add-member noteproperty ProgramID $ProgramID
    $out | add-member noteproperty FrameworkPublisher $FM.FrameworkPublisher
    $out | add-member noteproperty FrameworkName $FM.FrameworkName
    $out | add-member noteproperty FrameworkVersion $FM.FrameworkVersion
    $out
    }
    }
    $result | out-gridView

    Now, happy hunting for runtime dependencies!

  • HOW TO: Find 16-bit applications in your ACT inventory

    Posted on April 14th, 2011 By Andreas Stenhall + 2 comments

    When companies deploy Windows 7 most of them are looking at the 64-bit version of Windows 7. This architecture of Windows does not support running 16-bit applications, which unfortunately still is widely in use. If you do an inventory with ACT (Application Compatibility Toolkit) it will inventory all executables as well as CMD files and some other stuff and it will contain information about 16-bit applications lying around and being used by the users in your business.

    The trick is that the GUI does not provide a way to view these applications so you have to turn to doing a SQL query using for instance the SQL Management Studio Express tools. Use the SQL Query below to get information on any none 32- or 64-bit executable. The query (thanks to Chris Jackson) will return for instance WOW (Windows on Windows) or DOS applications and that will/might indicate a 16-bit app which you should prioritize to test and handle as necessary.

    USE ACTDATABASE
    GO

    SELECT DISTINCT Applications.appName, Static_App_Properties.fileName, fileModuleType

    FROM Static_App_Properties
    INNER JOIN Application_Instance_Files
    ON Static_App_Properties.identity_hash = Application_Instance_Files.filePropertyID
    INNER JOIN Applications
    ON Application_Instance_Files.appID = Applications.identity_hash

    WHERE fileModuleType<>'32BIT' AND fileModuleType<>'64BIT' AND propertyType='File'

    ORDER BY appName
    GO

    Happy hunting for 16-bit applications! :)