Opened 10 years ago

Closed 4 years ago

#2879 closed Bug (Wont Fix)

objcreate("Microsoft.Update.Session","REMOTEHOST") is not connecting to REMOTEHOST

Reported by: devilman16 Owned by:
Milestone: Component: AutoIt
Version: Severity: None
Keywords: Cc:


I want to list the installed Windows Updates on a remote system, but objcreate don't creates a remote object, it defines the object local -> no @error or else:

$objSession = ObjCreate("Microsoft.Update.Session","REMOTEHOST")
$objSearcher = $objSession.CreateUpdateSearcher 
$patches = $objSearcher.Search("IsInstalled=1 and Type='Software'") 
$InstalledCount = $patches.Updates.Count 

@error returns 0 and i get the $InstalledCount from the local system i run the script from - NOT the REMOTEHOST

In VBS it is working, and also if i make a workaround over ScriptControl

$strWks = "REMOTEHOST" 
$objSC = ObjCreate("MSScriptControl.ScriptControl") 
$objSC.Language = "VBScript" 
$code = 'Set Session = CreateObject("Microsoft.Update.Session","' & $strWks & '")' 
$objSession = $objSC.codeobject.session 
$objSearcher = $objSession.CreateUpdateSearcher 
$colUpdates = $objSearcher.Search("IsInstalled=1 and Type='Software'") 
$InstalledCount = $colUpdates.Updates.Count 

I think its a bug that it connect to the local system not the remotesystem


Attachments (0)

Change History (2)

comment:1 Changed 9 years ago by leighlandwhitehead

Hi Guys is there any update on this as i am getting the same problem ?


comment:2 Changed 4 years ago by Jpm

  • Resolution set to Wont Fix
  • Status changed from new to closed

no update so I close it

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

as closed The ticket will remain with no owner.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.