| |
|
|
Uwe ''Pascal'' Niemeier | Hi people!
time again what New: CompileMarkSeparationwindow %maxx,%maxy
$H Windows.ph
$H ocx3a.ph
$I ocx3a.inc
ocxInit()
var objLocator&=ocxCreate("WbemScripting.SWbemLocator")
var objService&=ocxMethod(objLocator&,"ConnectServer",".","root\cimv2")
declare Exec$
Exec$="SELECT * FROM Win32_PerfRawData_PerfOS_Memory"----Speicher
Exec$="SELECT * FROM Win32_SystemEnclosure"--------------PC-Gehäuse
Exec$="SELECT * FROM Win32_LogicalDisk"------------------Laufwerke
Exec$="SELECT * FROM Win32_OperatingSystem"--------------Infos über Windows
Exec$="SELECT * FROM Win32_PointingDevice"---------------Infos über Maus
Exec$="SELECT * FROM Win32_USBHub"-----------------------Verfügbare USB-Anschlüsse
Exec$="SELECT * FROM Win32_Printer"----------------------Infos über Drucker
Exec$="SELECT * FROM Win32_Process"----------------------Prozesse
Exec$="SELECT * FROM Win32_QuickFixEngineering"----------HotFixes
Exec$="SELECT * FROM Win32_Product"----------------------Alle installierten Programme
Exec$="SELECT * FROM Win32_StartupCommand"---------------Autostart-Programme
Exec$="SELECT * FROM Win32_NetworkAdapterConfiguration"--verfügbare Netzwerkverbindungen
Exec$="SELECT * FROM Win32_Service"----------------------Services
var Collection&=ocxMethod(objService&,"ExecQuery",Exec$)
var Count%=ocxGet(Collection&,"Count")
var Enum&=ocxGet(Collection&,"_NewEnum")
declare Obj&
whileloop 0,Count%
CallMethod(Enum&,3,1,Var#,0)--IEnumVARIANT::Next
casenot Var#.vt%=~VT_DISPATCH:break
Obj&=Var#.Val&
print &loop;" von ",Count%
print ocxMethod(Obj&,"GetObjectText_")
ocxRelease(Obj&)
print "<ENTER>"
waitinput
cls
endwhile
print "Ende"
ocxRelease(Enum&,Collection&,objService&,objLocator&)
ocxDeInit()
waitinput
BTW1: there The request a SQL-commands results, can itself the Result in the Vorfeld over suitable WHERE-terms eingrenzen.
BTW2: too The spending can itself on single Datenfelder limit. there but not any Datensätze The same boxes include (not even within of/ one system-category), would with request one not vorhandenen Field The Error Message "Unbekannter Name" erfolgen. this can itself suppress through Änderung the ocx-internen ErrorLevels. CompileMarkSeparationwindow %maxx,%maxy
$H windows.ph
$H ocx3a.ph
$I ocx3a.inc
ocxInit()
var Exec$=" SELECT * FROM Win32_LogicalDisk WHERE FileSystem = FAT32 "
var objLocator&=ocxCreate("WbemScripting.SWbemLocator")
var objService&=ocxMethod(objLocator&,"ConnectServer",".","root\cimv2")
var Collection&=ocxMethod(objService&,"ExecQuery",Exec$)
var Count%=ocxGet(Collection&,"Count")
var Enum&=ocxGet(Collection&,"_NewEnum")
declare Obj&
whileloop 1,Count%
CallMethod(Enum&,3,1,Var#,0)--IEnumVARIANT::Next
casenot Var#.vt%=~VT_DISPATCH:break
Obj&=Var#.Val&
ocxErrorlevel%=0--Error Message because of "Irgendwas" suppress
print "Name : ",ocxGet(Obj&,"Name")
print "Description: ",ocxGet(Obj&,"Description")
print "Irgendwas : ",ocxGet(Obj&,"Irgendwas")
ocxErrorLevel%=1--Fehlermeldungen as a precaution again to permit
ocxRelease(Obj&)
endwhile
ocxRelease(Enum&,Collection&,objService&,objLocator&)
ocxDeInit()
waitkey
thanks all here [...] and here [...] beteiligten for Why stay to!
SeeYou Pascal |
|
|
| |
|
|
|
| Genial, functions super!
(such tollen Codes erinner me always a tolles Codesnippets/ Thread- groups- and Schlagwortezuordnungssystem" the me there vorschwebt, so one z.B. too through Codesnippets-Rubriken browsen can) |
|
|
| |
|
|