Is Oracle WebLogic10 Installed?

We have a handful of boxes running WebLogic10 so it's not part of the base image.  Here's a quick way to determine if it's installed.

$reg = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey('LocalMachine', $myComputer);
$subKey= "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Oracle WebLogic" -replace '\\', '\\';
if (!($reg.OpenSubKey($subkey))) {
    Write-Warning ("${myComputer}: WebLogic10 not installed");
    $pass = $false;


Comments (2)

  1. tr says:

    why the -replace '\', '\'; don't think thats necessary with powershell is it?

  2. timdunn says:

    PS C:Documents and Settingstimid> $home

    C:Documents and Settingstimid

    PS C:Documents and Settingstimid> $home -replace ''

    Invalid regular expression pattern: .

    At line:1 char:18

    + $home -replace '' <<<<

    The '' is any NORMAL regular expression's way of escaping a metacharacter, such as 'n' or 's'.  PSH uses ` (backquote) instead, but .NET uses normal RegEx.

Skip to main content