Modify

Opened 12 years ago

Closed 6 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: 3.3.12.0 Severity: None
Keywords: Cc:

Description

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")
MsgBox(0,"",@error) 
$objSearcher = $objSession.CreateUpdateSearcher 
$patches = $objSearcher.Search("IsInstalled=1 and Type='Software'") 
$InstalledCount = $patches.Updates.Count 
MsgBox(0,"",$InstalledCount)

@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 & '")' 
$objSC.AddCode($code) 
$objSC.Run 
$objSession = $objSC.codeobject.session 
$objSearcher = $objSession.CreateUpdateSearcher 
$colUpdates = $objSearcher.Search("IsInstalled=1 and Type='Software'") 
$InstalledCount = $colUpdates.Updates.Count 
MsgBox(0,"",$InstalledCount)

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

(INFO: http://www.autoitscript.com/forum/topic/163840-objcreate-to-get-windows-update-info-on-remote-host/)

Attachments (0)

Change History (2)

comment:1 by leighlandwhitehead, 11 years ago

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

thanks

comment:2 by J-Paul Mesnage, 6 years ago

Resolution: Wont Fix
Status: newclosed

no update so I close it

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.