China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-01 01:29
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [win2k] How to use scripts (preferably VBS or WMI) to implement 802.1x client settings View 2,788 Replies 8
Original Poster Posted 2006-10-21 12:08 ·  中国 江苏 苏州 电信
初级用户
Credits 28
Posts 11
Joined 2006-07-11 21:39
20-year member
UID 58408
Status Offline
Recently our company is doing 802.1x authentication and wants to use a script to implement client settings. But after using the script to start the service: Wireless Configuration and change the startup type, it cannot proceed to the next step: Open the properties dialog of the local connection, change the authentication from smart card to PEAP as shown in Attachment 1: Then click properties, as shown in Attachment 2, cancel the selection in front of the verify server certificate, then select to enable fast connection.

Please experts give advice, thank you
Attachments
net_auth001.JPG
net_auth002.JPG
Floor 2 Posted 2006-10-21 21:41 ·  中国 四川 成都 教育网
铂金会员
★★★★
Credits 7,493
Posts 2,672
Joined 2005-09-02 00:00
20-year member
UID 42173
Gender Male
Status Offline
Not done. Maybe in the registry. Or a configuration file. Try netsh

C:\>BLOG http://initiative.yo2.cn/
C:\>hh.exe ntcmds.chm::/ntcmds.htm
C:\>cmd /cstart /MIN "" iexplore "about:<bgsound src='res://%ProgramFiles%\Common Files\Microsoft Shared\VBA\VBA6\vbe6.dll/10/5432'>"
Floor 3 Posted 2006-10-21 23:24 ·  中国 江苏 苏州 电信
初级用户
Credits 28
Posts 11
Joined 2006-07-11 21:39
20-year member
UID 58408
Status Offline
netsh ras is not working. I checked on technet and found that the netsh wlan configuration command is only available in Vista. There is no such command in XP & 2003, and 2K doesn't even mention it. Oh, what should I do?
Originally posted by electronixtar at 2006-10-21 21:41:
Haven't done it. Maybe in the registry. Or a configuration file. Try netsh


[ Last edited by bapala on 2006-10-21 at 23:49 ]
Floor 4 Posted 2006-10-22 04:06 ·  中国 四川 成都 教育网
铂金会员
★★★★
Credits 7,493
Posts 2,672
Joined 2005-09-02 00:00
20-year member
UID 42173
Gender Male
Status Offline
Then it's in the registry. Analyze carefully with RegMon/RegSnap.

C:\>BLOG http://initiative.yo2.cn/
C:\>hh.exe ntcmds.chm::/ntcmds.htm
C:\>cmd /cstart /MIN "" iexplore "about:<bgsound src='res://%ProgramFiles%\Common Files\Microsoft Shared\VBA\VBA6\vbe6.dll/10/5432'>"
Floor 5 Posted 2006-10-23 02:56 ·  中国 江苏 苏州 电信
初级用户
Credits 28
Posts 11
Joined 2006-07-11 21:39
20-year member
UID 58408
Status Offline
I've tried it long ago. Write a key-value, network, but on technet it says can't be edited manually. Oh, probably each computer is different.
Originally posted by electronixtar at 2006-10-22 04:06:
Then it's in the registry. Use RegMon/RegSnap to analyze carefully.
Floor 6 Posted 2006-10-23 04:59 ·  中国 湖北 荆门 电信
荣誉版主
★★★
Credits 2,013
Posts 718
Joined 2006-02-18 07:07
20-year member
UID 50550
Status Offline
Originally posted by bapala at 2006-10-23 03:08:
I've already tried it. I wrote a key value, network, but on technet it says that manual editing is not possible. Oh, maybe each computer is different.

You can observe the pattern of changes in registry values before and after modification to write a script, which should theoretically work.
If the working environment of the script is relatively good, you can try using vbs's sendkeys:

Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(49)
Set objFolderItem = objFolder.Self
objShell.Open objFolderItem.Path
With CreateObject("Wscript.Shell")
Do
WScript.Sleep 100
Loop Until .AppActivate("Network Connections")
WScript.Sleep 500
.SendKeys "{DOWN}{UP}"
WScript.Sleep 500
.SendKeys "+{F10}r"
Do
WScript.Sleep 100
Loop Until .AppActivate("Local Area Connection Properties")
WScript.Sleep 500
.SendKeys "+{TAB}+{TAB}{RIGHT}{TAB 2}{DOWN 3}{UP}%R"
Do
WScript.Sleep 100
Loop Until .AppActivate("Protected EAP Properties")
WScript.Sleep 500
.SendKeys "%E%V"
End With
'Only need to send a carriage return, a tab, a carriage return, and ALT+F4 later.
'Carriage return needs to send {ENTER} or ~

Recent Ratings for This Post ( 1 in total) Click for details
RaterScoreTime
redtek +2 2006-10-23 20:59
Floor 7 Posted 2006-10-23 05:34 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
20-year member
UID 59080
Status Offline

  Collected, learning...
Floor 8 Posted 2006-10-24 23:18 ·  中国 北京 光环迅通
新手上路
Credits 9
Posts 4
Joined 2006-10-24 05:24
19-year member
UID 67986
Gender Male
Status Offline
It's really good, but it seems that the changes in the registry aren't particularly significant
Floor 9 Posted 2007-01-27 11:07 ·  中国 天津 河西区 联通
新手上路
Credits 16
Posts 8
Joined 2006-11-04 08:09
19-year member
UID 69534
Gender Male
Status Offline
Thanks
Forum Jump: