• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Enumerating Uninstall Key from Registry

G

greatbarrier86

#1
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 Computer

S

Shay Levi

#2
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 Computer

G

greatbarrier86

#3
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 Computer

S

Shay Levi

#4
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 Computer

G

greatbarrier86

#5
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 Computer

Users Who Are Viewing This Thread (Users: 1, Guests: 0)