Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - Disconnecting (not disabling) a wifi connection

Reply
 
Old 07-10-2009   #1 (permalink)
rusga


 
 

Disconnecting (not disabling) a wifi connection

Hi all

I need to disconnect (not disable) any wifi connection at shutdown so it
will start in an disconnected state at next logon.

Is this possible with only vbs+wmi and not using any shell command like
devcon.exe?

Thanks in advance.

Good to be back at these newsgroups,
rusga

PS: On Win XP Pro.

My System SpecsSystem Spec
Old 07-10-2009   #2 (permalink)
mr_unreliable


 
 

Re: Disconnecting (not disabling) a wifi connection

rusga wrote:
Quote:

> I need to disconnect (not disable) any wifi connection at shutdown so it
> will start in an disconnected state at next logon.
>
hi Rusga,

If you don't mind messing with the registry, then you can
"disable" your wireless software from initializing upon
startup.

Here is how it goes (this is from a win98 system, but the
principal ought to be the same). For a linksys wireless
card, you will find the startup utility in "RunServices",
which calls for executing the wireless utility upon startup:

[HKLM\Software\Microsoft\Windows\CurrentVersion\RunServices]
"WMP54Gv4"="C:\\Program Files\\Linksys Wireless-G PCI Wireless Network
Monitor\\WMP54Gv4.exe"

Using the PCMag "StartCop" utility to disable this on
startup, you get the above entry deleted, and a new
entry (with the save value) placed in a new subkey
"RunServices-", that is, an almost-the-same registry
address, except for the "-" (minus) character at the end.
After disabling, the registry looks like this:

[HKLM\Software\Microsoft\Windows\CurrentVersion\RunServices-]
"WMP54Gv4"="C:\\Program Files\\Linksys Wireless-G PCI Wireless Network
Monitor\\WMP54Gv4.exe"

In this configuration, the system does NOT run the wireless
utility upon startup. To re-enable the wireless upon startup,
just reverse the above change. Note that you don't necessarily
have to use the "StartCop" approach, you could store your
key/value pair anywhere, for example "saveWirelessKeyValue".

Obviously your registry entries will be different, and probably
your wireless utility too (unless you happen to have exactly
the same wireless card as I do).

However, I still claim that this technique ought to work,
i.e., removing (and restoring) the wireless utility entry
in the registry.

cheers, jw
____________________________________________________________

You got questions? WE GOT ANSWERS!!! ..(but, no guarantee
the answers will be applicable to the questions)
My System SpecsSystem Spec
Old 07-10-2009   #3 (permalink)
rusga


 
 

Re: Disconnecting (not disabling) a wifi connection

Hi mr_unreliable and thanks for your response.
My remarks are inline.

On Fri, 10 Jul 2009 17:30:10 +0100, mr_unreliable
<kindlyReplyToNewsgroup@xxxxxx> wrote:
Quote:

> rusga wrote:
Quote:

>> I need to disconnect (not disable) any wifi connection at shutdown so
>> it will start in an disconnected state at next logon.
>>
>
> hi Rusga,
>
> If you don't mind messing with the registry, then you can
> "disable" your wireless software from initializing upon
> startup.
>
- I don't mind at all.
- I'm not using any manufacturer's software, only the native windows
service "Wireless Zero Configuration".
Quote:

> Here is how it goes (this is from a win98 system, but the
> principal ought to be the same). For a linksys wireless
> card, you will find the startup utility in "RunServices",
> which calls for executing the wireless utility upon startup:
>
> [HKLM\Software\Microsoft\Windows\CurrentVersion\RunServices]
> "WMP54Gv4"="C:\\Program Files\\Linksys Wireless-G PCI Wireless Network
> Monitor\\WMP54Gv4.exe"
>
- It's an on-board Atheros on Asus eeePC 701 netbooks.
Quote:

> Using the PCMag "StartCop" utility to disable this on
> startup, you get the above entry deleted, and a new
> entry (with the save value) placed in a new subkey
> "RunServices-", that is, an almost-the-same registry
> address, except for the "-" (minus) character at the end.
> After disabling, the registry looks like this:
>
> [HKLM\Software\Microsoft\Windows\CurrentVersion\RunServices-]
> "WMP54Gv4"="C:\\Program Files\\Linksys Wireless-G PCI Wireless Network
> Monitor\\WMP54Gv4.exe"
>
- I see what you mean. When needed, I use autoruns.exe from sysinternals.
It uses the same backup+delete approach.
Quote:

> In this configuration, the system does NOT run the wireless
> utility upon startup. To re-enable the wireless upon startup,
> just reverse the above change. Note that you don't necessarily
> have to use the "StartCop" approach, you could store your
> key/value pair anywhere, for example "saveWirelessKeyValue".
>
- I usualy dump the entry to a .reg file prior to edit/delete.
Quote:

> Obviously your registry entries will be different, and probably
> your wireless utility too (unless you happen to have exactly
> the same wireless card as I do).
>
> However, I still claim that this technique ought to work,
> i.e., removing (and restoring) the wireless utility entry
> in the registry.
>
> cheers, jw
> ____________________________________________________________
>
> You got questions? WE GOT ANSWERS!!! ..(but, no guarantee
> the answers will be applicable to the questions)

You just gave me a new heading on how to try to solve this.
Since it's a win service I'll try to tweek it using the registry.

A simple stop/start to the service won't work because the service stores
the state of the iface somewhere at the time it was shuted down and
restores it at startup. So whenever I start the service the iface will
imediately connect to where it was connected before (although the iface is
in manual mode?!?).

I guess MS considers this a MBIMTNTBUT - "Manual But Interrupted Mode That
Needs To Be Un-manual'd Temporarily" mode. ;-)

This approach by MS might be due to the fact that these portable things
tend to standby or even hibernate interrupting process that need to be
restored ASAP once "awakened".

Anyway, you gave me a nice push on this.

Thank you very much,
rusga
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
WiFi Connection keeps dropping Network & Sharing
WiFi looses connection Drivers
VoIP is disconnecting my whole connection. Network & Sharing
SP1 WiFi connection keeps getting disconnected Vista networking & sharing
Automatic WiFi Connection Vista networking & sharing


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46