EDN Admin
Well-known member
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
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