A slightly different approach. This will enumerate all of the software on a given server:

 Code:
Break on
Dim $SO
$SO = SetOption('Explicit',          'On')
$SO = SetOption('NoVarsInStrings',   'On')
$SO = SetOption('NoMacrosInStrings', 'On')
;
Dim $strComuter, $objWMIService, $colFeatures, $objFeature
;
$strComputer = "."
$objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" + $strComputer + "\root\cimv2")
$colFeatures = $objWMIService.ExecQuery("Select * from Win32_SoftwareFeature")
For Each $objFeature in $colFeatures
   ? + "Accesses:           " + $objFeature.Accesses
   ? + "Attributes:         " + $objFeature.Attributes
   ? + "Caption:            " + $objFeature.Caption
   ? + "Description:        " + $objFeature.Description
   ? + "Identifying Number: " + $objFeature.IdentifyingNumber
   ? + "Install Date:       " + $objFeature.InstallDate
   ? + "Install State:      " + $objFeature.InstallState
   ? + "Last Use:           " + $objFeature.LastUse
   ? + "Name:               " + $objFeature.Name
   ? + "Product Name:       " + $objFeature.ProductName
   ? + "Status:             " + $objFeature.Status
   ? + "Vendor:             " + $objFeature.Vendor
   ? + "Version:            " + $objFeature.Version
Next


Just change $strComputer to the remote workstation's name.