I have an issue with my computer where the wireless adapter doesn't automatically "turn on". In an effort to overcome this, it's been discovered that by turning on the Wireless Zero Configuration Service, and clicking the checkbox "Use Windows to configure my wireless network settings", the computer can connect to the internet. Recently though, I've been trying to come up with a batch script to do just those things to re-automate the process. I researched what I think is the appropriate solution, but I'm unsure if it actually is. From what I read, the equivalent to checking the checkbox is changing a value in the registry. I've copied the value and also exported the appropriate .reg file. My question here is how can I modify the existing value to what it needs to be using a batch script, if that is the solution that I need?
Here's the registry path, key, and value:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WZCSVC\Parameters\Interfaces\{FE2C0402-92E9-4CE3-9379-27A63FB88001}
"ControlFlags"="0f918002"
I greatly appreciate the help in advance.
Page 1 of 1
Using batch to add to the registry
#3
Posted 25 April 2012 - 08:59 AM
al1290, on 25 April 2012 - 04:39 AM, said:
From what I read, the equivalent to checking the checkbox is changing a value in the registry. I've copied the value and also exported the appropriate .reg file. My question here is how can I modify the existing value to what it needs to be using a batch script, if that is the solution that I need?
Here's the registry path, key, and value:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WZCSVC\Parameters\Interfaces\{FE2C0402-92E9-4CE3-9379-27A63FB88001}
"ControlFlags"="0f918002"
Here's the registry path, key, and value:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WZCSVC\Parameters\Interfaces\{FE2C0402-92E9-4CE3-9379-27A63FB88001}
"ControlFlags"="0f918002"
I am not sure to get the actual question.
You should have TWO .reg files, one with the *whatever* switched ON, and one with the *whatever* switched OFF.
As uid0 pointed out you can use both regedit or reg.exe to merge one or the other to the registry, but if you have .reg filetype registered correctly you can also double click on the .reg files, just in case:
http://ask-leo.com/h...to_install.html
But do you need a batch to right the value "on the fly " or to merge an existing .reg?
REG ADD will write a key or value
REG IMPORT will import a .reg file
jaclaz
#4
Posted 25 April 2012 - 11:33 AM
The value you've provided for the ControlFlags is for the enabled adaptor, (the disabled value should be dword:0f910002 or "261160962")
I would suggest that in order to perform the task you'd need to
I would suggest that in order to perform the task you'd need to
- Query the value in the registry and check if disabled using your known values.
- If the value shows disabled
- check if the Windows Zero Configuration Service is running and stop it if it is.
- Apply the known value to the registry.
- Start/restart the WZC service
- check if the Windows Zero Configuration Service is running and stop it if it is.
- ← VBScript - Ping multiple ip addresses and machine names
- Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
- TASKLIST →
Share this topic:
Page 1 of 1



Help
Back to top









