Perhaps this will work even better...

[Big Grin]



$officeindex = 0
$officekey = ENUMKEY("HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\"$officeindex)
While @Error=0 and $office=0
   $product = ReadValue ("HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\$officekey","DisplayName")
   If InStr ($product"Microsoft Office")
      $uninstallguid = "HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\$officekey"
      $office = $product
   Endif
   $officeindex = $officeindex + 1
   $officekey = ENUMKEY("HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\"$officeindex)
Loop

$productsindex = 0
$productskey = ENUMKEY("HKLM\Software\Classes\Installer\Products\"$productsindex)
While @Error=0 and $MSOProducts=0
   $product = ReadValue ("HKLM\Software\Classes\Installer\Products\$productskey","ProductName")
   If InStr ($product"Microsoft Office")
      $MSOProducts = "HKLM\Software\Classes\Installer\Products\$productskey"
   Endif
   $productsindex = $productsindex + 1
   $productskey = ENUMKEY("HKLM\Software\Classes\Installer\Products\"$productsindex)
Loop

$office
$uninstallguid
$MSOProducts
get $



[ 24. September 2003, 00:53: Message edited by: CitrixMan ]