Ja geht über Windows Scripting Host - den verwendest Du einfach mittels OLE / COM.
So in dem Stil über WMI kannst Du das dann von Lotus Script aus machen und in Notes-Dokumente schreiben.
http://www.quickintranet.com/zeroconnect/wmi.php
'Systems Managment
'Created by ZeroConnect
'4/23/03
'This is a WMI VBS script designed to inventory end-user computers.
On Error Resume Next
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_Processor")
For Each objItem in colItems
'this displays the property to the screen
'For Testing only, this line is not being used.
'Wscript.Echo "Maximum Clock Speed: " & objItem.MaxClockSpeed
'Make sure we can use our Network objects.
Set WshNetwork = WScript.CreateObject("WScript.Network")
Set oDrives = WshNetwork.EnumNetworkDrives
Set oPrinters = WshNetwork.EnumPrinterConnections
'this appends the data to the file.
Const ForAppending = 2
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.OpenTextFile _
("c:\status.txt", 8, True)
Set colServices = GetObject("winmgmts:")
objTextFile.WriteLine("Domain: " & WshNetwork.UserDomain)
objTextFile.WriteLine("User Name: " & WshNetwork.UserName)
objTextFile.WriteLine("Computer Name: " & WshNetwork.ComputerName)
objTextFile.WriteLine("Computer speed in MHZ: " & objItem.MaxClockSpeed)
objTextFile.WriteLine("CPU Manufacturer: " & objItem.Manufacturer)
objTextFile.WriteLine("CPU Details: " & objItem.Description)
'Get our Date to Write to the file
strComputer = "."
Set objSWbemServices = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colTimeZone = objSWbemServices.ExecQuery _
("SELECT * FROM Win32_TimeZone")
For Each objTimeZone in colTimeZone
strBias = objTimeZone.Bias
Next
dtmCurrentDate = Date
dtmTargetDate = Year(dtmCurrentDate)
dtmMonth = Month(dtmCurrentDate)
If Len(dtmMonth) = 1 Then
dtmMonth = "0" & dtmMonth
End If
dtmTargetDate = dtmTargetDate & dtmMonth
dtmDay = Day(dtmCurrentDate)
If Len(dtmDay) = 1 Then
dtmDay = "0" & dtmDay
End If
objTextFile.WriteLine("Date: " & dtmCurrentDate)
objTextFile.WriteLine("")
objTextFile.Close
Next
Grüße David
Guten Morgen,
habe vor Jahren in einer DB mal eine Scriptlib Systeminfo eingebaut (nicht selbstgemacht, sondern im Internet gefunden) und daraus per
Dim SI As New Sysinfo
With Doc
.SysInfo_Hostname = SI.GetLocalHostName
.SysInfo_IP = SI.GetIPAddress
.SysInfo_Res = SI.GetScreenResolution
.SysInfo_OSVERSION = SI.GetWindowsVersion
.SysInfo_CPU = SI.GetCPUSpeed
.SysInfo_NOTESUSER = GlobSes.UserName
.SysInfo_COLOR = SI.GetNumOfColors
.SysInfo_RAM = SI.GetTotalRAM
.SysInfo_BROWSERVERSION = SI.GetIEVersionFriendlyName
.SysInfo_USERINFO = SI.GetCurrentUser
.SysInfo_NOTESPROGDIR = SI.GetNotesProgramDirectory
.SysInfo_AVAILABLEDRIVES = SI.GetDrives
End With
die Werte ermittelt.
CU,
Axel
Hallo zusammen,
vielen Dank für eure Hilfe. Vor allem dir David !!
Eine Frage hab ich aber noch:
Set colDisks = objWMIService.ExecQuery("Select * from Win32_LogicalDisk")
For Each objDisk in colDisks
Wscript.Echo "DeviceID: " & objDisk.DeviceID
Wscript.Echo "Disk Size: " & objDisk.Size
Next
Mit dem Script bekomm ich alle Laufwerke des Rechners - auch die Netzlaufwerke. Kennt einer von euch eine möglichkeit nur die Lokalen Laufwerke zu bekommen ?
Gruß Chris
Über die Laufwerksbeschreibung. Dort wird es wunderschön angezeigt
....
Set colDisks = objWMIService.ExecQuery("Select * from Win32_LogicalDisk")
Forall objDisk In colDisks
If objDisk.Description = "Lokale Festplatte" Then
....
Gruß Chris