From: "Neil Waldhauer" Received: from [192.168.100.201] (HELO mail.2rosenthals.com) by 2rosenthals.com (CommuniGate Pro SMTP 5.1.16) with ESMTP id 1890833 for os2-wireless_users@2rosenthals.com; Sat, 07 Nov 2009 11:09:21 -0500 Received: from secmgr-va.2rosenthals.com ([162.83.95.194] helo=mail2.2rosenthals.com) by secmgr-ny.randr with esmtps (TLSv1:AES256-SHA:256) (Exim 4.43) id 1N6nqr-00014h-0G for os2-wireless_users@2rosenthals.com; Sat, 07 Nov 2009 11:09:21 -0500 Received: from host1.cruzio.com ([63.249.95.131]:50351) by mail2.2rosenthals.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1N6nql-0006AA-0D for os2-wireless_users@2rosenthals.com; Sat, 07 Nov 2009 11:09:15 -0500 Received: (qmail 53642 invoked from network); 7 Nov 2009 08:09:12 -0800 Received: from dsl-63-249-111-252.dhcp.cruzio.com (HELO 192.168.46.67) (63.249.111.252) by blondeguy.com with SMTP; 7 Nov 2009 08:09:12 -0800 X-CTCH-RefID: str=0001.0A020203.4AF59BAB.00C4,ss=1,fgs=0 Date: Sat, 7 Nov 2009 08:09:12 -0800 To: "OS/2 Wireless Users Mailing List" In-Reply-To: References: Subject: Re: [OS2Wireless] Command File to Enable/Disable WiFi MIME-Version: 1.0 X-Mailer: The Polarbar Mailer; version=1.25d; build=2006 X-Mailer-Platform: OS/2; architecture=x86; version=20.45 X-Mailer-Java-VM: IBM Corporation; version=J2RE 1.3.1 IBM build co131-20060605 (SR10) (JIT enabled: jitc); compiler=jitc Message-ID: On Fri, 06 Nov 2009 19:16:10 -0500 (EST), "Hakan" wrote: > Does anyone have the commands that need to be used in a CMD file to > enable/disable the built-in WiFi? I am currently doing it using the > eCenter widget but would like to have a CMD-file for enabling WiFi > while disabling the cabled connection, and vice versa. These are commands I used a long time ago. Modify them to suit yourself. Neil /* turn on the radio * This command activates the 802.11b interface * * The wireless NIC should be inserted in the PC Card slot */ wifiProg = "e:\programs\ambicom\wifistat.exe" say "Activating the wireless network card" '@ net stop messenger /y' '@ net stop req /y' '@ dhcpmon -t' '@ ifconfig lan0 down' '@ ifconfig lan0 delete' '@ route -fh' '@ arp -f' '@ dhcpstrt -i lan1 -d 0' '@ start' wifiProg '@ start dhcpmon' say "Wireless networking enabled" return /* turn off the radio * This command deactivates the 802.11b interface */ say "Deactivating the wireless network card" '@ go -k wifistat.exe' '@ go -k dhcpmon.exe' '@ dhcpmon -t' '@ ifconfig lan1 down' '@ ifconfig lan1 delete' '@ route -fh' '@ arp -f' '@ dhcpstrt -i lan0 -d 10' say "Cable networking enabled" -- Neil Waldhauer, neil@blondeguy.com I found God; now it's my turn to hide.