Einzelnen Beitrag anzeigen

hathor
(Gast)

n/a Beiträge
 
#1

[Info] WLAN / LAN einschalten und ausschalten

  Alt 14. Okt 2012, 21:16
dot3svc
Der Wired Autoconfig Service muss aktiv sein.

wlansvc
Automatische WLAN-Konfiguration muss aktiv sein.

services.msc starten
Folgende Dienste auf Starttyp Automatisch stellen:

Automatische Konfiguration (verkabelt)
Automatische WLAN-Konfiguration

Für den Kommando-Interpreter:

WLAN ON:
netsh wlan delete filter permission=denyall networktype=infrastructure
netsh wlan delete filter permission=denyall networktype=adhoc
netsh wlan set blockperiod 0

WLAN OFF:
netsh wlan add filter permission=denyall networktype=infrastructure
netsh wlan add filter permission=denyall networktype=adhoc
netsh wlan set blockperiod 60 //60 Minuten Sperre

LAN ON:
netsh lan set blockperiod 0

LAN OFF:
netsh lan set blockperiod 60 //60 Minuten Sperre

Überprüfung:
netsh wlan show settings
netsh lan show settings

Beispiele in DELPHI:
Delphi-Quellcode:
begin //wlan on
ShellExecute(Application.Handle, nil, 'netsh',
'wlan delete filter permission=denyall networktype=infrastructure', nil, SW_HIDE);
end;
.
begin //wlan off
ShellExecute(Application.Handle, nil, 'netsh',
'wlan add filter permission=denyall networktype=infrastructure', nil, SW_HIDE);
end;
.
Oder:
How do I disable a network connection using WMI?

Geändert von hathor (15. Okt 2012 um 19:14 Uhr)
  Mit Zitat antworten Zitat