הרשם שאלות ותשובות רשימת חברים לוח שנה חיפוש הודעות מהיום סמן פורומים כנקראו

   
|!|

 
 
כלים לאשכול תצורת הצגה
Prev הודעה קודמת   הודעה הבאה Next
ישן 20-06-08, 01:39   # 23
stel222
חבר מתקדם
 
מיני פרופיל
תאריך הצטרפות: Mar 2008
הודעות: 399

stel222 לא מחובר  

PHP קוד:
Set Shell Wscript.CreateObject("WScript.Shell")
Set File CreateObject("Scripting.FileSystemObject")

On Error Resume Next

set Dom 
getobject("WinNT://YOURDOMAIN")
Dom.Filter = array("computer")
avail false

for each item in Dom
ping item
.Name,avail
if avail true then maclist item.Name
next
wscript
.echo "MAC address capture complete..."
wscript.quit

'---
'
appends PC name and MAC address to macaddr.txt
Function macList(RemotePC)
Set IPConfigSet GetObject("winmgmts:" "{impersonationLevel=impersonate}!\\" RemotePC "\root\cimv2" ).ExecQuery ("SELECT MACAddress FROM Win32_NetworkAdapterConfiguration " "WHERE IPEnabled=true" )
For 
Each IPConfig In IPConfigSet
custom 
RemotePC vbTab IPConfig.MACAddress vbNewLine
Next

createTempfile custom

fileAppend File
.OpenTextFile ("c:\temp.txt"), File.OpenTextFile ("c:\macaddr.txt"8)
File.DeleteFile "c:\temp.txt"true
End 
Function


'---
'
This function appends one file to another
Function fileAppend(source,destination)
Do While 
source.AtEndOfline <> true
destination
.WriteLine(source.readline)
Loop

source
.close
destination
.close
End 
Function


'---
'
creates a txt file called temp.txt and write's data from dat to it
Function createTempfile(dat)
Set temp = File.CreateTextFile("c:\temp.txt")
temp.WriteLine dat
temp.Close
End Function


'
---
'pings a client

Function ping (RemotePC,avail)
Set objPing = GetObject("winmgmts:{impersonationLevel=impersonat e}").ExecQuery("select * from Win32_PingStatus where address = '" & RemotePC & "")
For Each objStatus in objPing
If IsNull(objStatus.StatusCode) or objStatus.StatusCode<>0 Then
avail = false
Else
avail = true
End If
Next
End Function 
  Reply With Quote
 

חברים פעילים הצופים באשכול זה: 1 (0 חברים ו- 1 אורחים)
 

כלים לאשכול
תצורת הצגה

חוקי פירסום
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is מופעל
סמיילים הם מופעל
[IMG] קוד מופעל
קוד HTML מכובה

קפיצה לפורום


כל הזמנים הם GMT +2. הזמן כעת הוא 02:24.

מופעל באמצעות VBulletin גרסה 3.8.6
כל הזכויות שמורות ©
כל הזכויות שמורות לסולל יבוא ורשתות (1997) בע"מ