Help - Search - Members - Calendar
Full Version: Help - Unattended wifi settings
MSFN Forums > Unattended Windows Discussion & Support > Unattended Windows 2000/XP/2003

   
Google Internet Forums Unattended CD/DVD Guide
mallen
I might be missing something really obvious here, but how can I go about adding a wireless network and configuring the WEP keys in an unattended manner? I need to be able to do this in an unattended installation of Windows XP Pro SP2, Server 2003 SP1, and XP Embedded SP2.

Any ideas anyone?

Thanks!
druiddk
Have you tried running regshot before and after setting it up? Im pretty sure its saved in registry!
mallen
I've tried looking in the registry and it is only stored there if you use wireless software for particular cards. Using windows wireless zero configuration doesn't seem to put anything in the registry. I did a bit of digging and found this article:
http://msdn.microsoft.com/library/default....ardsettings.asp
I believe the best way to add the settings is to create a custom app that uses the WPS (wireless provisioning service) to add the settings from an xml file. I think you can create the xml file using the wizard that saves settings to a usb key, then pinch it off there. All of this is only available in XPSP2 or W2KSP1.
druiddk
I will try to play abit with InstallRite today if i have time.
dougiefresh
QUOTE (mallen @ Dec 21 2005, 04:14 AM) *
How can I go about adding a wireless network and configuring the WEP keys in an unattended manner?

Try using AutoIt for this solution. I use it to craft unattended solutions to software that won't install unattendedly, or won't install like I want it to unattendedly. AutoIt might work for this particular problem, but I don't have a wireless card in my hardware collection so I would not be able to craft a script for you.
Djé
Hi,

I was in the same need and couldn't find any proper answer so I'm presently trying to craft something using AutoIt to unattendedly hook to my home WLAN providing a WEP key.

First tries succeeded at run time but failed to do so during unattended installation.

I will post news here when it will work.
Djé
Here it is.

WPS (wireless provisioning service) API is not well documented.The WPS DDK (which i found) comes with some sample source code but it require Windows DDK (which I haven't) to compile.

So I wrote autoWEP, an AutoIt script that automate the filling of the "Wireless Network Setup Wizard" with your SSID and WEP/WPA key.
I ran it successfully many times from RunOnceEx, on 2 laptops with different wireless cards.
I don't know if it works earlier in the install process.

Interestingly, you DON'T even need a wireless adapter to run this, only XP sp2 as it uses the Wireless Zero Configuration. Plug-in your nic later and ... the SSID of your network will be selected automagically!

The .rar archive contains
- the .au3 script to be compile to a .exe prog with AutoIt,
- a .ini configuation file to hold your values and to be used with the exe
(please RTFM at the beginning of this file),
- an icon ResHacked from xpsp2 to (optionaly) compile the script with.

Please note that you should first fill the configuration file. Don't forget to check the 'wizard window title' in your OS language.
Currently, only the French title is validated.
If you post the title in your language here, I will update the file.
Djé
Thanks to BoarBabe who stung my curiosity, here is an even simpler version of autoWEP:

It does not even requires you to set the 'wizard window title': it finds it on its own, like a big boy !
It should now be completely Language Independant, at least for western languages.

Just feed it with your SSID and WEP/WPA (in a file or on the command line), et voilà!

This version (AutoWEP0.3) doesn't requires anything else but a recent beta version of AutoIt to be compiled/run with.
And more than ever, it works with Windows XP sp2 and above, but NO NEED for a wireless adapter!


Addendum to The F*cking Manual: For specifying WPA encription within the .ini file, you must have a 'UseWPA = yes' or 'UseWPA = WPA' directive in the [Wlan] section of the .ini file (This was not well documented in TFM at the top of the .ini file, shame on me):
autowep.ini
CODE
[AutoWEP]
version  = 0.0.3b0
[Wlan]
WlanSSID = OhFcukIForgotToInsertMyOwnValues
Wlankey  = WHATALAMERIAMICANTFIGURETHISOUT
UseWPA = yes

If you use a WEP key, just forget about this directive.
druiddk
Very nice Djé!
RyanVM
Pardon my ignorance, but does the WPA parameter also cover WPA2-PSK?
Foose
Having a weird error with the script and I am unsure why it is happening. Tried it command line and in the INI but it tells me my wep key is invalid length. Here is my ini (slightly altered)


[AutoWEP]
version = 0.0.3b0
[Wlan]
WlanSSID = myssid
Wlankey = 736475940a7b9df73849e72a55


the ssid is made up, but i left my key. As you can see it is 26 characters long. This is unaltered (other than the ssid name) as it appears in the ini. Am i missing quotes or something else?
The Glimmerman
@RyanVM

Yes it does. I use it smile.gif
Foose
QUOTE
Having a weird error with the script and I am unsure why it is happening. Tried it command line and in the INI but it tells me my wep key is invalid length. Here is my ini (slightly altered)


[AutoWEP]version = 0.0.3b0
[Wlan]
WlanSSID = myssid
Wlankey = 736475940a7b9df73849e72a55


the ssid is made up, but i left my key. As you can see it is 26 characters long. This is unaltered (other than the ssid name) as it appears in the ini. Am i missing quotes or something else?


Ok, to add to the troubleshooting. On a machine that has never had wireless profile set up on it, it always fails at the wep length. On a machine that has had at least 1 profile created on it it goes passed the WEP section and the next screen (to save to a USB drive) and asks for a USB key to save data to(like it is missing the click to bypass the USB). If you follow through slightly, it finishes itself on the final screen to close out.


Again, seems just like a click number issue or something. I am running normal XP SP2, US English. Any ideas?




EDIT: Ok, i messed and fussed and messed for days on this. Finally broke down and downloaded the beta version of autoit and it works flawlessly. Sigh. Maybe I missed you saying you build this with beta.
bober
thanks Djé,

works perfectly smile.gif
Djé
QUOTE (Foose @ Jul 7 2006, 04:05 PM) *
EDIT: Ok, i messed and fussed and messed for days on this. Finally broke down and downloaded the beta version of autoit and it works flawlessly. Sigh. Maybe I missed you saying you build this with beta.

@Foose:
I'm Sorry that I could not help you before but glad that you eventually found the root of the problem.
I'll try to make it more clear about the beta version of AutoIt.
Also, I've just found that the 'UseWPA' parameter in the .ini file is not documented enough, so I'll update this as well.

@The Glimmerman: Can you give us more infos because Ryan replied in another thread that he did not manage to achieve this?
Foose
QUOTE (Djé @ Jul 8 2006, 05:36 AM) *
QUOTE (Foose @ Jul 7 2006, 04:05 PM) *
EDIT: Ok, i messed and fussed and messed for days on this. Finally broke down and downloaded the beta version of autoit and it works flawlessly. Sigh. Maybe I missed you saying you build this with beta.

@Foose:
I'm Sorry that I could not help you before but glad that you eventually found the root of the problem.
I'll try to make it more clear about the beta version of AutoIt.
Also, I've just found that the 'UseWPA' parameter in the .ini file is not documented enough, so I'll update this as well.

@The Glimmerman: Can you give us more infos because Ryan replied in another thread that he did not manage to achieve this?



It's my own ignorance. I knew i had to be missing something since the rest of you were ok.
druiddk
Hmm I wish this would work for me :-(
Im trying to get it to work on a Windows XP Pro OEM SP2 DANISH (DK/DAN) using AutoIT beta 3.2.1.5b.

It just opens up with Wireless configuration window (Named: Guiden Installation af Trådløst netværk).

I tried calling the compiled exe directly and also using a ini - still no joy sad.gif

Any tips? :-)
stevnhoved
QUOTE (druiddk @ Oct 2 2006, 11:55 AM) *
Im trying to get it to work on a Windows XP Pro OEM SP2 DANISH (DK/DAN) using AutoIT beta 3.2.1.5b.
It just opens up with Wireless configuration window (Named: Guiden Installation af Trådløst netværk).

Hi! I had the same problem with a danish version. And solved by doing so:
Find line 74, that looks like:
$resource = DllCall("user32.dll", "long", "LoadString", "long", $xpsp2resLib[0], "long", 16201, "str", "", "long", 256).
Change 16201 to 16150.

The two text-string is alike in the English version, but different in the Danish version.

Best Regards,
Martin.
JayIT
Hi Guys, I have compiled Autowep with AutoIT3 Beta using my SSID and WPA key, but when i run the .exe nothing happens. If i right click the .exe and select run as i get the following AutoIT error: Unable to open the script file.

Any suggestions please?
JuMz
Sweet! Didn't know you could do unattended Wifi settings...!
Bruce Darby
OK, my first post. Please be gentile with me, ok? whistling.gif This has been bugging me to DEATH on how to automatically provide Wireless Network Connection settings (SSID, Netowork key) during an unattended installation. While I haven't spent an enormous amount of time up on the Windows website, I was able to find this little piece of information after actually running the Wireless Network Setup Wizard and then exploring my little ol' thumbdrive. http://download.microsoft.com/download/a/f...-UFD_XPspec.doc and I truly cannot say that I understand it in the least because I am not in any way a bonified programmer or script creation expert. Perhaps one of the more enlightened forum members can shed some bright idea's upon us all. If there were a way to implement this into a script or small executable, it would even work for RyanVM's WPA2-PSK needs.

Bruce
Bruce Darby
Necessity IS the mother of invention thumbup.gif From zero to zero in just over two weeks. I've gotten myself a script put together that will allow a person to connect to a wireless network using 'any' authentication and encryption method. Thanks to Boarbabe and Dje for giving me the impetus to really start digging. I found an incomplete AutoIt script on the AutoIt forums that showed me how to actually use some of the features of AutoIt to open the windows I wanted to use and I was able to complete a script that allows the user to select not only the SSID and Authentication mode, but also to select the Encryption mode as well as setting the Network Key programmatically. The script is in no way a 'pretty' thing, but it does what I want it to do, which is to connect my computer to an already existing wireless network without user intervention. If anyone would like to download it and use it, they are more than welcome.

Click to view attachment

Thoughts and ruminations welcome!

Bruce
silacomalley
QUOTE (Bruce Darby @ Oct 6 2007, 02:07 AM) *
Necessity IS the mother of invention thumbup.gif From zero to zero in just over two weeks. I've gotten myself a script put together that will allow a person to connect to a wireless network using 'any' authentication and encryption method. Thanks to Boarbabe and Dje for giving me the impetus to really start digging. I found an incomplete AutoIt script on the AutoIt forums that showed me how to actually use some of the features of AutoIt to open the windows I wanted to use and I was able to complete a script that allows the user to select not only the SSID and Authentication mode, but also to select the Encryption mode as well as setting the Network Key programmatically. The script is in no way a 'pretty' thing, but it does what I want it to do, which is to connect my computer to an already existing wireless network without user intervention. If anyone would like to download it and use it, they are more than welcome.

Click to view attachment

Thoughts and ruminations welcome!

Bruce


I've been thinking on how to do the automated WiFi profile install for a few weeks, but didn't know how to implement it!

I can't get it to hold the profile on my system though. It goes through the notions and when I check my settings, no new profile exists. Even after rebooting! I have subsituded the script with my wireless details and I can clearly see my config settings flash up on the Wireless applets as they run through the script!

I'm sure it does work and I have a feeling something on my system is stopping it from working fully. Great info, thanks Bruce.
Arie
Configure your wireless connection manually. At the same time, take a look at the posted AutoIt script and compare what you do manually to what the script does. Does your manual configuration work? Does it match the actions as written in the posted AutoIt script? If the answer to both questions is "yes", then it should work.
Bruce Darby
QUOTE (silacomalley @ Oct 14 2007, 05:27 PM) *
I've been thinking on how to do the automated WiFi profile install for a few weeks, but didn't know how to implement it!

I can't get it to hold the profile on my system though. It goes through the notions and when I check my settings, no new profile exists. Even after rebooting! I have subsituded the script with my wireless details and I can clearly see my config settings flash up on the Wireless applets as they run through the script!

I'm sure it does work and I have a feeling something on my system is stopping it from working fully. Great info, thanks Bruce.


Silacomalley,

The script should be run after the wireless network drivers have been installed. In that way, the WZC already has the network identified, though without the specific SSID, etc., it won't connect. If the drivers for the wireless card haven't been installed, I've noticed that the WZC doesn't always allow settings to be saved as there isn't anything that is 'connecting' to the network. My script is only for connecting to an already existing wireless network, not for creating said network. Hope you work it out as it was a lesson in utility for me to get everything working. smile.gif

Bruce
garetjax76
QUOTE (stevnhoved @ Jul 10 2007, 01:09 PM) *
QUOTE (druiddk @ Oct 2 2006, 11:55 AM) *
Im trying to get it to work on a Windows XP Pro OEM SP2 DANISH (DK/DAN) using AutoIT beta 3.2.1.5b.
It just opens up with Wireless configuration window (Named: Guiden Installation af Trådløst netværk).

Hi! I had the same problem with a danish version. And solved by doing so:
Find line 74, that looks like:
$resource = DllCall("user32.dll", "long", "LoadString", "long", $xpsp2resLib[0], "long", 16201, "str", "", "long", 256).
Change 16201 to 16150.

The two text-string is alike in the English version, but different in the Danish version.

Best Regards,
Martin.


16150 also works with Italian XP, so I think this is the right string to be used.
If you're trying this on a non-English XP, I suggest to try first 16150.
If it still doesn't work, you should download and install Resource Explorer, open xpsp2res.dll and search around the strings 1000-1014 for the caption of the wizard dialog box in your language (in the right panel). The number of the string is the number to be used instead of 16201.

JuMz
I use this to get my WIFI settings unattendedly...

http://www.engl.co.uk/products/zwlancfg/

Works well. Supports WPA/WPA2/WPA w 802.1x etc.

No issues here.
Google Internet Forums Unattended CD/DVD Guide
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.