Jump to content

Adding Wireless WPA password during install?


Recommended Posts

I made a little thingy for my own, it's simple and straight forward :) I't works flawless for me an is very easy to setup.

You will need to get the txt for the dialogs from your OS language as I made this on Norwegian OS. The Title is automatic, but each windows text needs to be changed.

Ofcourse you also need to input your SSID and WEP/WPA.

Call me a dufus, but can you translate it to english. I am strugling on the verbage.

Thanks :)

Edit: (also posted in the other thread) I am having an odd problem with the Autowep script. It is telling me my wep key is the improper length both when i use it command line or in the ini. Here is a sample of my ini slightly altered.

[AutoWEP]

version = 0.0.3b0

[Wlan]

WlanSSID = myssid

Wlankey = 736475940a7b9df73849e72a55

Am i missing quotes or something else?

Second Edit:

Did my best to translate BoardBabe's script for the screens and it doesn't seem to move passed the first screen. Here is my script as is, any suggestions on what i am missing?

#NoTrayIcon

opt('WinTitleMatchMode', 4)

$SSID = 'centssid'

$KEY = '736475940a7b9df73849e72a55'

$UseWPA = 0

$TimeOut = 120 ; Script timeout in secounds, just in case something goes wrong.

Run(@SystemDir & '\rundll32.exe shell32.dll,Control_RunDLL NetSetup.cpl,@0,WNSW')

$Time = TimerInit()

$classname = 'classname=#32770'

WinWaitActive($classname)

$handle = WinGetTitle($classname, '')

$PID = WinGetProcess($handle)

Do

Select

; Create a secure wireless network window.

Case WinExists($handle, 'set up a security-enabled wireless network') ; Translate me.

ControlClick($handle, 'set up a security-enabled wireless network', 'Button2') ; Translate me.

; Install a new wireless network window.

Case WinExists($handle, 'install a new wireless network') ; Translate me.

ControlClick($handle, 'set up a new wireless network', 'Button1') ; Translate me.

ControlClick($handle, 'set up a new wireless network', 'Button4') ; Translate me.

; Network name window.

Case WinExists($handle, 'network name') ; Translate me.

ControlSetText($handle, 'network name', 'Edit1', $SSID) ; Translate me.

ControlClick($handle, 'network name', 'Button2') ; Translate me.

If $UseWPA = 1 Then

ControlCommand($handle, 'network name', 'Button3', 'Check', '') ; Translate me.

EndIf

ControlClick($handle, 'network name', 'Button7') ; Translate me.

; WEP/WPA key window.

Case WinExists($handle, 'network key') ; Translate me.

ControlSetText($handle, 'network key', 'Edit1', $KEY) ; Translate me.

ControlSetText($handle, 'network key', 'Edit2', $KEY) ; Translate me.

If $UseWPA = 1 Then

ControlClick($handle, 'network key', 'Button9') ; Translate me.

Else

ControlClick($handle, 'network key', 'Button8') ; Translate me.

EndIf

; Two methods to install a wireless network window.

Case WinExists($handle, 'two methods for creating a wireless network') ; Translate me.

ControlClick($handle, 'two methods for creating a wireless network', 'Button2') ; Translate me.

ControlClick($handle, 'two methods for creating a wireless network', 'Button11') ; Translate me.

While WinExists($handle, 'two methods for creating a wireless network') ; Translate me.

If WinExists($handle, '871122') Then _Abort()

WEnd

; Complete window.

Case WinExists($handle, 'click finish') ; Translate me.

ControlClick($handle, 'click finish', 'Button13') ; Translate me.

Case Else

Sleep(500)

EndSelect

If TimerDiff($Time) > $TimeOut * 1000 Then _Abort()

Until Not ProcessExists($PID)

Exit

Func _Abort()

If ProcessExists($PID) Then

ProcessClose($PID)

Exit (2)

Else

Exit (3)

EndIf

EndFunc

Edited by Foose
Link to comment
Share on other sites

  • 5 months later...

Sorry to resurect an old topic, but rather than create a new one and point to this one, I'd rather post in here so people know exactly what I'm referring to.

I can't find a copy of this script. I would like to use this on my own unattended cd as I have about 4 laptops that I reload with XP and all use a wireless network. I think that this script would help speed up my installs.

Thanks in advance for any information.

Link to comment
Share on other sites

  • 10 months later...

I've recently discovered 2 tools to add wireless profiles unattended:

1) Zwlancfg from http://www.engl.co.uk/products/zwlancfg/

2) Wifi_config from http://code.mincus.com/31/windows-wireless.../#comment-40848

CAVEATS: FOR XP,both require the KB918997 Wireless Lan API Update and the 'pre-req' for this is MSXML 6...AND it only works for x86 systems

FOR Vista: Should work right off the bat! But for vista, just use 'netsh wlan' (google it)

I just developed a script that would check for these updates (note that if the user does not have these updates, they would have to be installed and the computer must be rebooted before the tool can be used)...Just thought I would post my experiences for the next guy who 'google hits' this thread...

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...