1

Konu: networkteki domaine bağlı pc'lerin

networkteki domaine bağlı pc'lerin özelliklerini nasıl öğrenebilirim

2 Son düzenleyen, ugurlu2001 (18.09.2009 12:32:04)

Re: networkteki domaine bağlı pc'lerin

Ö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

Uğur
-------------------------------------------------------------------------------------------------------------
Hayat bir bisiklete binmek gibidir. Pedalı çevirmeye devam ettiğiniz sürece düşmezsiniz. Claude Peppeer
Kusuru söylenmeyen adam, ayıbını hüner sanır.  Türk Atasözü

3

Re: networkteki domaine bağlı pc'lerin

evet bios,cpu,hdd gibi özellikleri almamız mümkün mü

bu arada forumda bulanan arkadaşların ramazan bayramını kutlarım

4

Re: networkteki domaine bağlı pc'lerin

Kulefilili, seninde geçmiş bayramın kutlu olsun smile

Forumda daha önce; söylediğin pc özelliklerini alabileceğin örnekler zaten konulmuştu. arama kısmından bulabilirsin.

Uğur
-------------------------------------------------------------------------------------------------------------
Hayat bir bisiklete binmek gibidir. Pedalı çevirmeye devam ettiğiniz sürece düşmezsiniz. Claude Peppeer
Kusuru söylenmeyen adam, ayıbını hüner sanır.  Türk Atasözü

5 Son düzenleyen, ugurlu2001 (23.09.2009 12:47:57)

Re: networkteki domaine bağlı pc'lerin

Kodlar bana ait değil; umarım işinize yarar
Public Codes; not mine

Visual Fox Pro
*!* 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

Visual Fox Pro
* 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
Uğur
-------------------------------------------------------------------------------------------------------------
Hayat bir bisiklete binmek gibidir. Pedalı çevirmeye devam ettiğiniz sürece düşmezsiniz. Claude Peppeer
Kusuru söylenmeyen adam, ayıbını hüner sanır.  Türk Atasözü