Windows Vista Forums

Enumerating Uninstall Key from Registry

  1. #1


    greatbarrier86 Guest

    Enumerating Uninstall Key from Registry

    My plan is to be able to pull just the names of all the installed programs. I
    know Win32_Product will get the ones installed by windows installer, but not
    the ones installed w/o it. I assume i need to start with
    hklm:Software\Microsft\Windows\CurrentVersion\Uninstall, but i dont know
    where to go from there. I know i have to somehow parse the Name string, but
    i'm not sure how.

      My System SpecsSystem Spec

  2.   


  3. #2


    Shay Levi Guest

    Re: Enumerating Uninstall Key from Registry

    This will list all uninstall applications name

    dir HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall | foreach {[io.path]::GetFileName($_)}


    Shay
    http://scriptolog.blogspot.com



    > My plan is to be able to pull just the names of all the installed
    > programs. I know Win32_Product will get the ones installed by windows
    > installer, but not the ones installed w/o it. I assume i need to start
    > with hklm:Software\Microsft\Windows\CurrentVersion\Uninstall, but i
    > dont know where to go from there. I know i have to somehow parse the
    > Name string, but i'm not sure how.
    >




      My System SpecsSystem Spec

  4. #3


    greatbarrier86 Guest

    Re: Enumerating Uninstall Key from Registry

    that works...but it lists some of them by GUID. how do i actually get inside
    the key itself?

    "Shay Levi" wrote:

    > This will list all uninstall applications name
    >
    > dir HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall | foreach {[io.path]::GetFileName($_)}
    >
    >
    > Shay
    > http://scriptolog.blogspot.com
    >
    >
    >
    > > My plan is to be able to pull just the names of all the installed
    > > programs. I know Win32_Product will get the ones installed by windows
    > > installer, but not the ones installed w/o it. I assume i need to start
    > > with hklm:Software\Microsft\Windows\CurrentVersion\Uninstall, but i
    > > dont know where to go from there. I know i have to somehow parse the
    > > Name string, but i'm not sure how.
    > >

    >
    >
    >


      My System SpecsSystem Spec

  5. #4


    Shay Levi Guest

    Re: Enumerating Uninstall Key from Registry

    Also filters out GUIDs and KBs

    $kb = "KB[0-9]{6}.*"
    $guid = "\{[0-9a-fA-F]{8}(\-[0-9a-fA-F]{4}){3}\-[0-9a-fA-F]{12}\}"
    $names = dir HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall |
    select {[io.path]::GetFileName($_.name)}
    $names | where {$_ -notmatch "$guid|$kb"}


    Shay
    http://scriptolog.blogspot.com



    > This will list all uninstall applications name
    >
    > dir HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall |
    > foreach {[io.path]::GetFileName($_)}
    >
    > Shay
    > http://scriptolog.blogspot.com
    >> My plan is to be able to pull just the names of all the installed
    >> programs. I know Win32_Product will get the ones installed by windows
    >> installer, but not the ones installed w/o it. I assume i need to
    >> start with hklm:Software\Microsft\Windows\CurrentVersion\Uninstall,
    >> but i dont know where to go from there. I know i have to somehow
    >> parse the Name string, but i'm not sure how.
    >>




      My System SpecsSystem Spec

  6. #5


    greatbarrier86 Guest

    Re: Enumerating Uninstall Key from Registry

    Thank you very much!

    "Shay Levi" wrote:

    > Also filters out GUIDs and KBs
    >
    > $kb = "KB[0-9]{6}.*"
    > $guid = "\{[0-9a-fA-F]{8}(\-[0-9a-fA-F]{4}){3}\-[0-9a-fA-F]{12}\}"
    > $names = dir HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall |
    > select {[io.path]::GetFileName($_.name)}
    > $names | where {$_ -notmatch "$guid|$kb"}
    >
    >
    > Shay
    > http://scriptolog.blogspot.com
    >
    >
    >
    > > This will list all uninstall applications name
    > >
    > > dir HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall |
    > > foreach {[io.path]::GetFileName($_)}
    > >
    > > Shay
    > > http://scriptolog.blogspot.com
    > >> My plan is to be able to pull just the names of all the installed
    > >> programs. I know Win32_Product will get the ones installed by windows
    > >> installer, but not the ones installed w/o it. I assume i need to
    > >> start with hklm:Software\Microsft\Windows\CurrentVersion\Uninstall,
    > >> but i dont know where to go from there. I know i have to somehow
    > >> parse the Name string, but i'm not sure how.
    > >>

    >
    >
    >


      My System SpecsSystem Spec


Enumerating Uninstall Key from Registry
Similar Threads
Thread Forum
Enumerating IIS 6 App Pools PowerShell
How to Uninstall Registry Cleaner Trial Program Vista performance & maintenance
Enumerating the Registry... Vista General
Enumerating printers in WPF Avalon
registry cleanup after Difficult Trend Micro PC-cillin uninstall Vista performance & maintenance