Konu: networkteki domaine bağlı pc'lerin
networkteki domaine bağlı pc'lerin özelliklerini nasıl öğrenebilirim
Giriş yapmadınız. Lütfen giriş yapın yada kayıt olun.
networkteki domaine bağlı pc'lerin özelliklerini nasıl öğrenebilirim
Özellik derken neyi kasdediyorsun? IP mi, BIOS bilgisimi, CPU yada HDD bilgisimi?
Eğer ağdaki kullanıcılıarın tümünün IP bilgisi gerekiyorsa aşağıdaki linki tavsiye ederim:
Jun Tangunan 'ın diğer örnekleri de son derece kullanışlı.
http://weblogs.foxite.com/sandstorm36/a … /7793.aspx
evet bios,cpu,hdd gibi özellikleri almamız mümkün mü
bu arada forumda bulanan arkadaşların ramazan bayramını kutlarım
Kulefilili, seninde geçmiş bayramın kutlu olsun
Forumda daha önce; söylediğin pc özelliklerini alabileceğin örnekler zaten konulmuştu. arama kısmından bulabilirsin.
Kodlar bana ait değil; umarım işinize yarar
Public Codes; not mine
*!* Let's get the CPU ID
LOCAL lcComputerName, loWMI, lowmiWin32Objects, lowmiWin32Object
lcComputerName = GETWORDNUM(SYS(0),1)
loWMI = GETOBJECT("WinMgmts://" + lcComputerName)
lowmiWin32Objects = loWMI.InstancesOf("Win32_Processor")
FOR EACH lowmiWin32Object IN lowmiWin32Objects
WITH lowmiWin32Object
? "ProcessorId: " + TRANSFORM(.ProcessorId)
ENDWITH
ENDFOR
*-----------------------------
*!* Let's get the MAC Address(es)
LOCAL lcComputerName, loWMIService, loItems, loItem, lcMACAddress
lcComputerName = "."
loWMIService = GETOBJECT("winmgmts:\" + lcComputerName + "rootcimv2")
loItems = loWMIService.ExecQuery("Select * from Win32_NetworkAdapter",,48)
FOR EACH loItem IN loItems
lcMACAddress = loItem.MACAddress
IF !ISNULL(lcMACAddress)
? "MAC Address: " + loItem.MACAddress
?
ENDIF
ENDFOR
*-----------------------------
* MainboardID
loWMI = GETOBJECT("WinMgmts://./root/cimv2")
BaseBoards = loWMI.InstancesOf("Win32_BaseBoard")
FOR EACH MotherBoard IN BaseBoards
?"Product: " + MotherBoard.Product
?"SerialNumber: " + MotherBoard.SerialNumber
NEXT
* Local IP
*-----------------------------
oWinSock = CreateObject("MSWinsock.Winsock")
?oWinSock.LocalIP
*- Çıkış IP si ve Windows Sistem Bilgisi
* Genel Çıkış IP si
UrlName="http://vbnet.mvps.org/resources/tools/getpublicip.shtml"
oHTTP=NEWOBJECT("winhttp.winhttprequest.5.1")
oHTTP.Open("GET",UrlName,.F.)
oHTTP.Send()
ohTTP.ResponseText
nFirstSingleQuote=AT("'",ohTTP.ResponseText)
nLengthToPull=AT("'",ohTTP.ResponseText,2)-nFirstSingleQuote-1
? SUBSTR(ohTTP.ResponseText,nFirstSingleQuote+1,nLengthToPull)
* Local IP
oWinSock = CreateObject("MSWinsock.Winsock")
?oWinSock.LocalIP
LOCAL IPSocket
crlf=chr(13)+chr(10)
&&local ip adresi
IPSocket = CreateObject("MSWinsock.Winsock")
if type('IPSocket')='O'
IPAddress = IPSocket.LocalIP
localhostname=IPSocket.localhostname
remotehost=IPSocket.remotehost
remotehostip=IPSocket.remotehostip
MessageBox ("Local IP = " + IPAddress+crlf+"local host = "+localhostname;
+crlf+"Remotehost = "+remotehost+crlf+"Remotehostip = "+remotehostip)
else
MessageBox ("Winsock Yuklu Degil!")
ENDIF
* Başka örnek
Declare Integer WSACleanup In ws2_32
Declare String inet_ntoa In ws2_32 Integer in_addr
Declare Integer gethostbyname In ws2_32 String Host
Declare Integer WSAStartup In ws2_32 Integer wVerRq, String lpWSAData
Declare RtlMoveMemory In kernel32 As CopyMemory String @Dest,Integer Src,Integer nLength
CLEA
If WSAStartup(0x202,Repli(Chr(0),512))=0
*? GetIP("network teki bir bilgisayar ismi")
*? GetIP("localhost")
? GetIP(Alltrim(Strextract(Id(),"","#")))
=WSACleanup()
Endif
Function GetIP(cServer)
#Define HOSTENT_SIZE 16
Local nStruct,nSize,cBuffer,nAddr,cIP
nStruct=gethostbyname(cServer)
If nStruct=0
Return "0.0.0.0"
Endif
cBuffer=Repli(Chr(0),HOSTENT_SIZE)
cIP=Repli(Chr(0),4)
=CopyMemory(@cBuffer,nStruct,HOSTENT_SIZE)
=CopyMemory(@cIP,buf2dword(Subs(cBuffer,13,4)),4)
=CopyMemory(@cIP,buf2dword(cIP),4)
Return inet_ntoa(buf2dword(cIP))
Endfunc
Function buf2dword(lcBuffer)
Return Asc(Substr(lcBuffer,1,1))+Bitlshift(Asc(Subs(lcBuffer,2,1)),8)+;
Bitlshift(Asc(Subs(lcBuffer,3,1)),16)+Bitlshift(Asc(Subs(lcBuffer,4,1)),24)
Endfunc