Windows 7 64 bit ActiveX can't create object 'GetObject'

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
When I attempt to run VBScript on my Window 7 64 Bit I get runtime error: ActiveX component cant create object: GetObject

strComputer = "."<br/>
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\" & strComputer & "rootcimv2")<br/>
Set colComputer = objWMIService.ExecQuery _<br/>
("Select * from Win32_ComputerSystem")<br/>
For Each objComputer in colComputer<br/>
intRamMB = int((objComputer.TotalPhysicalMemory) /1048576)+1<br/>
Wscript.Echo "System Name ...... " & objComputer.Name _<br/>
& vbCrLf & "Total RAM ........ " & intRamMB & " MBytes."

View the full article
 
Back
Top