Jump to content











Photo
- - - - -

PENetwork - Auto Load WLAN profiles??


  • Please log in to reply
5 replies to this topic

#1 diputs

diputs
  • Members
  • 2 posts
  •  
    United States

Posted 16 April 2010 - 10:20 PM

I've have PE Network running in my Live XP (SP2) build. It copies my WLAN drivers, hotfix, and WLAN profile. I can find the WLAN profile in the system directory, but it isn't automatically imported to the preferred networks in PE Network. If i run PENetwork and import it, everything works fine and it connects to the network. Is there anyway to eliminate this manual step? I need to have it auto-connect to my WLAN on boot. Thanks.

#2 Bukvod

Bukvod

    Frequent Member

  • Advanced user
  • 123 posts
  •  
    United States

Posted 16 September 2010 - 08:50 AM

I would also like to know how to do this

#3 Holger

Holger

    Silver Member

  • .script developer
  • 534 posts
  • Location:Munich
  • Interests:- programming / scripting
    - scooter driving / modifying
    - writing poems
  •  
    Germany

Posted 16 September 2010 - 09:47 AM

It's implemented in new version 0.57 which will be released end of september/begin october :hyper:

#4 ScarySpons

ScarySpons

    Member

  • Members
  • 36 posts
  •  
    Zimbabwe

Posted 23 September 2010 - 12:09 PM

at last ... :cheers: .. can't wait...

thanx!

#5 ScarySpons

ScarySpons

    Member

  • Members
  • 36 posts
  •  
    Zimbabwe

Posted 01 November 2010 - 12:12 PM

Is v57 already out?
i see it in ur signature Holger...
can we get it already? :cheers:

#6 ttv100it

ttv100it
  • Members
  • 5 posts
  •  
    Italy

Posted 01 November 2010 - 01:40 PM

use autoit script for load wlan profile at penetwork start..

1 - example:script
==========================================================


#CS
13/08/2009 - Version 3.1b
-----------------------------------------------------------------
----------------------NATIVE WIFI FUNCTIONS----------------------
--------------------------For WinXP SP3--------------------------
----------------------------by MattyD----------------------------
-----------------------------------------------------------------

This is a quick how to...
Check the help for a comprehensive coverage of functions!

The syntax for these functions is used for back compatablity
It is recomended that newcomers use the V3.1a functions

If you are using 3rd party software to configre your connections
this script will give windows control

The connections section is commented out for sake of annoyance

This script assumes you are connected when running
#CE
#Include "Native_Wifi_Func_V3_1b.au3"
#include <array.au3>

;----------------------------------------------------------------
;Setting up the Session...
;----------------------------------------------------------------
$Interfaces = _Wlan_StartSession() ;Calls Openhandle, EnumInterfaces and SetGlobalConstants
;If successful it returns output from EnumInterfaces and sets @extended to the client handle
;SetGlobalConstants is called with the client handle and the pointer to the guid of the first interface
;
;Still confused? (Its not essential unless you wish to control a second wifi card)
;We can manually set up the session by:
;
;$Handle = _Wlan_OpenHandle()
;$Interfaces = ($Handle)
;_Wlan_SetGlobalConstants($Handle, $Interfaces[0][0]) (this allows -1 to be subsituted for client handle and guid pointer values in subsequent functions)

;_ArrayDisplay($Interfaces, "Interface Array") ;$Interfaces[Interface][0] - pointer to a GUID struct
; Used for multiple wifi cards (lets functions know which adaptor to talk to)
;$Interfaces[Interface][1] - Adaptor name
;$Interfaces[Interface][2] - Connection state. Connected, Disconnected or Authenticating - Read next section for more info!

;----------------------------------------------------------------
;Adaptor related functions
;----------------------------------------------------------------
_Wlan_SetInterface(-1, -1, 0, "Auto Config Enabled") ;Auto Config Enabled or Auto Config Disabled - Some 3rd party wifi managers will switch this setting off again if it wants control!

$QI = _Wlan_QueryInterface(-1, -1, 0) ;The "use Windows to configure my wireless network settings" checkbox - Needs to be enabled for many funtions to work


_Wlan_SetInterface(-1, -1, 1, "Infrastructure Only") ;Infrastructure Only, Ad Hoc Only, or Any Available Network

$QI = _Wlan_QueryInterface(-1, -1, 1)



If $CmdLine[0] == 0 Then
ConsoleWrite("Error: No XML file name was supplied.")
Exit 1
EndIf

If $CmdLine[0] > 1 Then
ConsoleWrite("Error: Incorrect number of command line arguments")
Exit 1
EndIf

If StringRegExp(StringRight($CmdLine[1], 4), "(?i)\.xml") <> 1 Then
ConsoleWrite('Error: Given file name is not of type: ".xml": ' & $CmdLine[1])
Exit 1
EndIf

; Reading the profile from an XML file
$fh = FileOpen ( $CmdLine[1], 0 )
If $fh == -1 Then
ConsoleWrite("Error: Could not read from XML file: " & $CmdLine[1])
Exit 1
EndIf

$profileXml = FileRead($fh)
FileClose($fh)

; Setting the profile
$a_iCall = DllCall($WLANAPIDLL, "dword", "WlanSetProfile", "hwnd", $GLOBAL_hClientHandle, "ptr", $Interfaces[0][0], "dword", 0, "wstr", $profileXml, "ptr", 0, "int", 1, "ptr", 0, "dword*", 0)
If @error <> 0 Then
ConsoleWrite("Error: Could not set profile from XML file: " & $CmdLine[1])
Exit 1
Else
If $a_iCall[0] <> 0 Then
$ErrorMessage = _Wlan_GetErrorMessage($a_iCall[0])
ConsoleWrite("Error: Could not set profile from XML file: " & $CmdLine[1] & @CRLF & "Error (" & $a_iCall[0] & "): " & $ErrorMessage)
Exit 1
EndIf
EndIf

ConsoleWrite("Success: Setting a profile from XML file: " & $CmdLine[1])

_Wlan_EndSession(-1) ;Calls CloseHandle and closes the dll

==========================================================

2 - create batch with penetwork called at start open new document with notepad and write:

@Import.exe wifi_ok.xml

and save with name profile.cmd


wifi_ok.xml is profile saved with penetwok

3 modify penetwork.ini with this example:

[Static IP address]
Computername=MINIPC
Workgroup=WORKGROUP
NetAdapter1.UseDHCP=0
NetAdapter1.IP=192.168.0.45
NetAdapter1.SM=255.255.255.0
NetAdapter1.DG=192.168.0.1
NetAdapter1.DNS=80.93.143.42
NetAdapter1.WINS=
NetAdapter1.MAC=
StartSharing=
ShareAll=
NetPath=
CMDStart.CMD1=profile.cmd <------------ this mod start batch file
Desc.Line1=IP: 192.168.0.200
Desc.Line2=SM: 255.255.255.0
Desc.Line3=DG: 192.168.0.1
Desc.Line4=Computername: MININT-PE....
Desc.Line5=Workgroup: workgroup

this way function on my livexp with sp3 source

sorry for my poor english...

Edited by ttv100it, 01 November 2010 - 02:02 PM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users