# Accessing Control Panel Server 2003

**URL:** https://forums.powershell.org/t/accessing-control-panel-server-2003/2171
**Category:** PowerShell Help
**Created:** [December 27, 2013, 4:39am UTC](https://forums.powershell.org/t/accessing-control-panel-server-2003/2171 "2013-12-27T04:39:35Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![michael-orellana-54](https://avatars.discourse-cdn.com/v4/letter/m/ecae2f/32.png) [@michael-orellana-54](https://forums.powershell.org/u/michael-orellana-54)
#### Post date: [December 27, 2013, 4:39am UTC](https://forums.powershell.org/t/accessing-control-panel-server-2003/2171/1 "2013-12-27T04:39:35Z")

</div>

I am having trouble how to figure out how to access the items in the programs and features with powershell on server 2003. I currently have a script that will check if a specific application is installed under programs and then execute more commands after that, this is on server 2008.

$checkMSI = (Get-WmiObject -Query ‘SELECT \* from win32\_product where IdentifyingNumber = “{E876A5DA-9506-4F94-A304-E032CB53E970}”’).IdentifyingNumber

unfortunately the class “win32\_product” is not available in server 2003.

Any help would be appreciated : ).

---

<div class="post-metadata">

### Author: ![donj](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/donj/32/137_2.png) [@donj](https://forums.powershell.org/u/donj)
#### Post date: [December 27, 2013, 4:46am UTC](https://forums.powershell.org/t/accessing-control-panel-server-2003/2171/2 "2013-12-27T04:46:29Z")

</div>

Win32\_Product is a separate install in Win2003. You should find it on any Win2003 install DVD under the Support or Tools folder.

---

<div class="post-metadata">

### Author: ![michael-orellana-54](https://avatars.discourse-cdn.com/v4/letter/m/ecae2f/32.png) [@michael-orellana-54](https://forums.powershell.org/u/michael-orellana-54)
#### Post date: [December 27, 2013, 4:54am UTC](https://forums.powershell.org/t/accessing-control-panel-server-2003/2171/3 "2013-12-27T04:54:37Z")

</div>

Ok, thank you very much. In my environment I have alot of servers that are in facilities out of state so I dont have immediate access to them to go ahead and install this addition to them, do you know of any other way to access the control panel in 2003? Or is this by far the easiest route.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex019/uploads/powershell/original/1X/385e4f9fe133561ad30a814262fe0e0ae6bc3ef0.png) [@system](https://forums.powershell.org/u/system)
#### Post date: [December 27, 2013, 5:46am UTC](https://forums.powershell.org/t/accessing-control-panel-server-2003/2171/4 "2013-12-27T05:46:32Z")

</div>

I wouldn’t recommend using Win32\_Product even if you had it available. See this blog post for the details on why: [http://myitforum.com/cs2/blogs/gramsey/archive/2011/01/25/win32-product-is-evil.aspx](http://myitforum.com/cs2/blogs/gramsey/archive/2011/01/25/win32-product-is-evil.aspx)

All of the information that you need to reproduce Win32\_Product’s behavior (without the annoying side effects) can be found in the registry, mostly under the key HKEY\_LOCAL\_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\ . This covers software that was installed with a Windows Installer package. Other, non MSI-based software can be found under the registry key HKEY\_LOCAL\_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\ . (There are some entries under the Uninstall key for MSI-based packages as well, but not with nearly as much detail as you’ll find under the Installer key.)

---

<div class="post-metadata">

### Author: ![david-christian](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/david-christian/32/918_2.png) [@david-christian](https://forums.powershell.org/u/david-christian)
#### Post date: [December 31, 2013, 5:37am UTC](https://forums.powershell.org/t/accessing-control-panel-server-2003/2171/5 "2013-12-31T05:37:55Z")

</div>

Maybe this function will help. It parses the registry keys Dave mentioned.  
`function Get-InstalledProgram{
<#
.SYNOPSIS
Gets the installed programs.`

`
```
.DESCRIPTION
	This function queiries the registry for installed programs. 

.PARAMETER DisplayName
	Optional filter. Name of the program. Suports wild cards.

.PARAMETER Publisher
	Optional filter. Name of the appliication vendor. Supports wild cards.

.EXAMPLE
	Get-InstalledPrograms 

.EXAMPLE
	Get-InstalledPrograms -Publisher VMware* 

.EXAMPLE
	Get-InstalledPrograms | Out-GridView

.INPUTS
	System.String,System.String

.OUTPUTS
	PSOBject

.NOTES
	Created on: 8/10/2013 8:32 PM
    Created by: David Christian

.LINK
	opscripting.com

```
#>
```
[CmdletBinding()]
param(
	[Parameter(Position=0)]
    [Alias('Name')]	
    [System.String] 
    $DisplayName,
  
    [Parameter(Position=1)]
    [Alias('Vendor')]
	[System.String]
	$Publisher
	)

#region Filter Prep
$WhereFilter = '![System.String]::IsNullOrEmpty($_.DisplayName)'
Write-Verbose -Message "Base Where filter: $WhereFilter"

If($DisplayName){
    $WhereFilter = '{0} -and ($_.DisplayName -like "{1}")' -f $WhereFilter,$DisplayName
    Write-Verbose -Message "Adding display filter: $WhereFilter"
}

If($Publisher){
    $WhereFilter = '{0} -and ($_.Publisher -like "{1}")' -f $WhereFilter,$Publisher
    Write-Verbose -Message "Adding publisher filter: $WhereFilter"
}

$whereBlock = [scriptblock]::Create($WhereFilter)
#endregion Filter Prep

#region Uninstall Registy Keys

$UNINSTALL_ROOT = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*"
$UNINSTALL_WOW = "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*"
$UNINSTALL_USER = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*"
$UNINSTALL_WOWUSER = "HKCU:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*"

#endRegion Uninstall Registy Keys
    
$regPath = @{n='RegistryKey';E={$_.PSPath.Split('::')[-1]}}

[System.String[]]$RegKeys = $UNINSTALL_ROOT, $UNINSTALL_USER, $UNINSTALL_WOW, $UNINSTALL_WOWUSER

foreach ($key in $RegKeys) {
    if(Test-Path -Path $key){
        Write-Verbose -Message "Reading $key"
        
        $regKeyColumn = @{Name='RegistyKey';Expression={$key}}
        
        try{
        	Get-ItemProperty -Path $key -Name * -ErrorAction 'Stop'| 
                Where-Object $whereBlock | 
                Select-Object -Property DisplayName,
                                        DisplayVersion,
                                        Publisher,
                                        UninstallString,
                                        $regPath
		}
        Catch{
            Write-Warning -Message $_.Exception.Message
		}#end Catch
	}
}#end foreach key

```
`

`}#end Get-InstalledProgram
`

---

<div class="post-metadata">

### Author: ![michael-orellana-54](https://avatars.discourse-cdn.com/v4/letter/m/ecae2f/32.png) [@michael-orellana-54](https://forums.powershell.org/u/michael-orellana-54)
#### Post date: [January 3, 2014, 9:41am UTC](https://forums.powershell.org/t/accessing-control-panel-server-2003/2171/6 "2014-01-03T09:41:38Z")

</div>

Is this the easiest way that one would be able to determine if a program was installed using powershell?

---

<div class="post-metadata">

### Author: ![michael-orellana-54](https://avatars.discourse-cdn.com/v4/letter/m/ecae2f/32.png) [@michael-orellana-54](https://forums.powershell.org/u/michael-orellana-54)
#### Post date: [January 3, 2014, 11:26am UTC](https://forums.powershell.org/t/accessing-control-panel-server-2003/2171/7 "2014-01-03T11:26:18Z")

</div>

Well It looks like with all your help and a little poking around on google, found the solution to my problem

Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* | Where-Object {$\_.DisplayName -eq “Windows Installer PowerShell Module”}

Thanks for everyones help!

---

<div class="post-metadata">

### Author: ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)
#### Post date: [May 16, 2024, 8:52pm UTC](https://forums.powershell.org/t/accessing-control-panel-server-2003/2171/8 "2024-05-16T20:52:29Z")

</div>


