לוגו אתר Fresh          
 
 
  אפשרות תפריט  ראשי     אפשרות תפריט  צ'אט     אפשרות תפריט  מבזקים     אפשרות תפריט  צור קשר     חץ שמאלה חץ ימינה  

לך אחורה   לובי הפורומים > מחשבים > מערכות הפעלה
שמור לעצמך קישור לדף זה באתרי שמירת קישורים חברתיים
תגובה
 
כלי אשכול חפש באשכול זה



  #4  
ישן 15-02-2009, 21:59
צלמית המשתמש של The IceMan
  The IceMan מנהל The IceMan אינו מחובר  
\dev\null
 
חבר מתאריך: 08.11.02
הודעות: 11,379
בתגובה להודעה מספר 1 שנכתבה על ידי זיו שמתחילה ב "יש אפשרות להפעיל/לכבות חיבור רשת דרך שורת פקודה?"

VBSCRIPT מתאים לך ?
אני משתמש בו הרבה כדי לכבות ולהדליק את הכרטיס שלי,
הסקריפט פשוט משנה את המצב הנוכחי
תוכל לבודד את החלקים עבור כיבוי או הפעלה בנפרד

קוד:
Const ssfCONTROLS = 3 sConnectionName = "Realtek RTL8139 Family Fast Ethernet NIC" sEnableVerb = "En&able" sDisableVerb = "Disa&ble" set shellApp = createobject("shell.application") set oControlPanel = shellApp.Namespace(ssfCONTROLS) set oNetConnections = nothing for each folderitem in oControlPanel.items if folderitem.name = "Network Connections" then 'if folderitem.name = "Network and Dial-up Connections" then set oNetConnections = folderitem.getfolder: exit for end if next if oNetConnections is nothing then msgbox "Couldn't find 'Network and Dial-up Connections' folder" wscript.quit end if set oLanConnection = nothing for each folderitem in oNetConnections.items if lcase(folderitem.name) = lcase(sConnectionName) then set oLanConnection = folderitem: exit for end if next if oLanConnection is nothing then msgbox "Couldn't find '" & sConnectionName & "' item" wscript.quit end if bEnabled = true set oEnableVerb = nothing set oDisableVerb = nothing s = "Verbs: " & vbcrlf for each verb in oLanConnection.verbs s = s & vbcrlf & verb.name if verb.name = sEnableVerb then set oEnableVerb = verb bEnabled = false end if if verb.name = sDisableVerb then set oDisableVerb = verb end if next 'debugging displays left just in case... ' 'msgbox s ': wscript.quit 'msgbox "Enabled: " & bEnabled ': wscript.quit 'not sure why, but invokeverb always seemed to work 'for enable but not disable. ' 'saving a reference to the appropriate verb object 'and calling the DoIt method always seems to work. ' if bEnabled then ' oLanConnection.invokeverb sDisableVerb oDisableVerb.DoIt MsgBox "Disabling Network Card" else ' oLanConnection.invokeverb sEnableVerb oEnableVerb.DoIt 'MsgBox "Enabling Network Card" end if 'adjust the sleep duration below as needed... ' 'if you let the oLanConnection go out of scope 'and be destroyed too soon, the action of the verb 'may not take... ' wscript.sleep 1000
תגובה ללא ציטוט תגובה עם ציטוט חזרה לפורום
תגובה

כלי אשכול חפש באשכול זה
חפש באשכול זה:

חיפוש מתקדם
מצבי תצוגה דרג אשכול זה
דרג אשכול זה:

מזער את תיבת המידע אפשרויות משלוח הודעות
אתה לא יכול לפתוח אשכולות חדשים
אתה לא יכול להגיב לאשכולות
אתה לא יכול לצרף קבצים
אתה לא יכול לערוך את ההודעות שלך

קוד vB פעיל
קוד [IMG] פעיל
קוד HTML כבוי
מעבר לפורום



כל הזמנים המוצגים בדף זה הם לפי איזור זמן GMT +2. השעה כעת היא 17:30

הדף נוצר ב 0.17 שניות עם 10 שאילתות

הפורום מבוסס על vBulletin, גירסא 3.0.6
כל הזכויות לתוכנת הפורומים שמורות © 2024 - 2000 לחברת Jelsoft Enterprises.
כל הזכויות שמורות ל Fresh.co.il ©

צור קשר | תקנון האתר