Deploying Windows 7 x64 and configuring Wireless settings
Hello my friends, a customer wants me to deploy Windows 7 x64 and configure the wireless settings.
Now the above is no problem i managed to export a wireless profile, but when i deploy this thing it keeps asking the password when i wants to connect via the wireless.
Anyone experience with this?
December 24th, 2010 1:23pm
Ok here is where i am:
I exported the profile to an xml file with the command:
netsh wlan export profile name="MyProfileName" folder=c:\Temp interface="Wireless Network Connection" key=clear
This creates a xml file
I created a vbscript that copies this xml file to a temp folder on the target machine and then executes the command :
netsh wlan add profile filename="location of xml file" interface="Wireless Network Connection" user=all
netsh wlan connect name="profilename"
delete the xml file becaus it contains wifikey in plaintekst
Free Windows Admin Tool Kit Click here and download it now
December 24th, 2010 3:32pm
Ok the above works, the issue was i forgot the key=clear when i exported the profile, this made another machine ask for the web
December 24th, 2010 5:24pm
Hi,
Could you post your vbs file ?
Free Windows Admin Tool Kit Click here and download it now
May 27th, 2011 8:55am
Hello Gregory_Tech, i'm nog a great scripter, but this is my install.vbs script that i launch from the SCCM taks sequence.
'Declare Variables
Dim FSO, Newfolder, WshShell
'Configure Variables
Set FSO = CreateObject("Scripting.FileSystemObject")
Set WshShell = WScript.CreateObject("WScript.Shell")
Main
Public Function Main()
'Create folder if required
If Not FSO.FolderExists("C:\Windows\Temp\WifiConfig") Then
NewFolder = FSO.CreateFolder("C:\Windows\Temp\WifiConfig\")
'Wscript.Echo "Creating folder"
End If
'Copy files localy
If FSO.FolderExists ("C:\Windows\Temp\WifiConfig") Then
'Wscript.Echo "Copy file Config.xml"
FSO.CopyFile ".\Config.xml","C:\Windows\Temp\WifiConfig\"
'Wscript.Echo "Copy file Configure.cmd"
FSO.CopyFile ".\Configure.cmd","C:\Windows\TEMP\WifiConfig\"
End If
'execute program
'Wscript.Echo "Executing Configure.cmd"
WshShell.Run "C:\Windows\Temp\WifiConfig\Configure.cmd"
CleanUp
End Function
Public Function CleanUp()
'Start cleaning up
'delete xml file cause psw is plain tekst
If FSO.FileExists ("C:\Windows\TEMP\WifiConfig\Config.xml") Then
'Wait a second or two
Wscript.Sleep 2000
'Wscript.Echo "Deleting config file"
FSO.DeleteFile("C:\Windows\TEMP\WifiConfig\Config.xml")
End If
If FSO.FileExists ("C:\Windows\TEMP\Wificonfig\Configure.cmd") Then
'Wait a second or two
Wscript.Sleep 2000
'Wscript.Echo "Deleting Configure file"
FSO.DeleteFile("C:\Windows\TEMP\WifiConfig\Configure.cmd")
End If
If FSO.FolderExists ("C:\Windows\Temp\WifiConfig") Then
FSO.DeleteFolder("C:\Windows\Temp\WifiConfig")
End If
End Function
This is my configure.cmd file:
netsh wlan add profile filename="C:\Windows\Temp\WifiConfig\Config.xml" interface="Wireless Network Connection" user=All
netsh wlan connect name=home123
Hope it helps
May 27th, 2011 9:06am