Escolar Documentos
Profissional Documentos
Cultura Documentos
AutoItSetOption("TrayIconDebug", 1)
; ----------------------------------------------------------------------------
; checking for windows xp sp2
; ----------------------------------------------------------------------------
#include <GUIConstants.au3>
if @OSVersion = "WIN_XP" then $WINVER = "Windows XP"
if @OSVersion = "WIN_2003" then $WINVER = "Windows 2003"
if @OSVersion = "WIN_2000" then $WINVER = "Windows 2000"
if @OSVersion = "WIN_NT4" then $WINVER = "Windows NT 4"
if @OSVersion = "WIN_ME" then $WINVER = "Windows ME"
if @OSVersion = "WIN_98" then $WINVER = "Windows 98"
if @OSVersion = "WIN_95" then $WINVER = "Windows 95"
if @OSVersion <> "WIN_XP" Then
msgbox(0 , "Operating System and Service Pack Check", "This script only work
s on Windows XP Systems and your Operating System is " & $WINVER & " - Please co
ntact the Helpdesk" )
Exit
EndIf
if @OSServicePack <> "Service Pack 2" Then
MsgBox(16,"Operating System and Service Pack Check","The Wireless Profile se
tup will only run on Windows XP computers with Service Pack 2.")
Exit
EndIf
;~ -----------------------------------------------------------------------------
---------
;~ checking for a program called ipass, which disables the wireless profile tab
;~ -----------------------------------------------------------------------------
---------
while ProcessExists ( "IPassConnectGUI.exe" )
ProcessClose ( "IPassConnectGUI.exe" )
sleep (500)
WEnd
; ----------------------------------------------------------------------------
; Setting the Options for all Offices
; ----------------------------------------------------------------------------
Global $SSID = 'YOURSSIDHERE'
Global $WEP = 'YOURWEPKEYHERE'
sleep (50)
BlockInput ( 1 )
sleep (50)
Run(@ComSpec & " /c " & 'ncpa.cpl', "C:\WINDOWS\system32\dllcache", @SW_HIDE)
sleep (50)
WinWait ( 'Network Connections' )
if NOT WinActive ( 'Network Connections', '' ) then
WinActivate ( 'Network Connections' )
endif
WinWaitActive ( 'Network Connections' )
sleep ( 50 )
Send ( 'wireless' )
sleep ( 50 )
send ('{Appskey}')
sleep ( 50 )
send ( 'r' )
sleep (50)
WinWait ( 'Wireless Network Connection Properties', 'Connect using:' )
if NOT WinActive ( 'Wireless Network Connection Properties', 'Connect using:' )
then
WinActivate ( 'Wireless Network Connection Properties', 'Connect using:' )
endif
WinWaitActive ( 'Wireless Network Connection Properties', 'Connect using:' )
sleep ( 50 )
Send ( '+{Tab}' )
sleep ( 50 )
send ( '+{Tab}' )
sleep ( 50 )
send ('{Right}' )
sleep (50)
WinWait ( 'Wireless Network Connection Properties', 'Wireless Networks' )
if NOT WinActive ( 'Wireless Network Connection Properties', 'Wireless Networks'
) then
WinActivate ( 'Wireless Network Connection Properties', 'Wireless Networks'
)
endif
WinWaitActive ( 'Wireless Network Connection Properties', 'Wireless Networks' )
sleep ( 50 )
Send ( '!a' )
sleep (50)
WinWait ( 'Wireless network properties', 'Association' )
if NOT WinActive ( 'Wireless network properties', 'Association' ) then
WinActivate ( 'Wireless network properties', 'Association' )
endif
WinWaitActive ( 'Wireless network properties', 'Association' )
sleep ( 1 )
Send ( $SSID )
sleep ( 5 )
send ('{Tab}')
sleep ( 1 )
send ('{S}')
sleep ( 1 )
send ('{Tab}')
sleep ( 1 )
send ('{W}')
sleep ( 1 )
send ('{Tab}')
sleep ( 1 )
send ("{SPACE}")
sleep ( 1 )
send ('+{Tab}')
sleep ( 1 )
send ('+{Tab}')
sleep ( 1 )
send ( $WEP )
sleep ( 5 )
send ('+{Tab}')
sleep ( 5 )
send ( $WEP )
sleep ( 1 )
send ('{Tab}')
sleep ( 1 )
send ('{Tab}')
sleep ( 1 )
send ('{Tab}')
sleep ( 1 )
send ('{Tab}')
sleep ( 1 )
send ('{Tab}')
sleep ( 1 )
send ('{ENTER}')
sleep ( 1 )
send ('{Tab}')
sleep ( 1 )
send ('{Tab}')
sleep ( 1 )
send ('{Tab}')
sleep ( 1 )
send ('{Tab}')
sleep ( 1 )
send ('{Tab}')
sleep ( 1 )
send ('{Tab}')
sleep ( 1 )
send ('{Tab}')
sleep ( 1 )
send ('{Tab}')
sleep ( 1 )
send ('{Tab}')
sleep ( 1 )
send ('{ENTER}')
sleep ( 1 )