1. 시작 메뉴에 바로 가기 등록
C:\Documents and Settings\[USER]\시작 메뉴\프로그램\시작프로그램\abc-login.vbs 바로가기

2. register 등록
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]
"My VBS Script"="C:\abc\abc-login.vbs"

'abc-login.vbs
set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "cmd"
WScript.Sleep 100 '0.1 secs
WshShell.AppActivate "C:\Windows\system32\cmd.exe"
WScript.Sleep 100
WshShell.SendKeys "telnet abc.com {ENTER}"
WScript.Sleep 2000
WshShell.SendKeys "GET /main.html?user_id=apple HTTP/1.0{ENTER}"
WshShell.SendKeys "User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4{ENTER}"
WshShell.SendKeys "Host: abc.com{ENTER}"
WshShell.SendKeys "{ENTER}"
WshShell.SendKeys "{ENTER}"
WScript.Sleep 2000
WshShell.SendKeys "exit{ENTER}" 'close cmd.exit


windows 에서 telnet 을 이용한 http server 자동 테스트.
test.vbs 로 저장한 뒤 더블클릭(또는 윈도 배치(시작프로그램 등)에 등록)



set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "cmd"
WScript.Sleep 100
WshShell.AppActivate "C:\Windows\system32\cmd.exe"
WScript.Sleep 100
WshShell.SendKeys "telnet yahoo.com 80{ENTER}"
WScript.Sleep 2000
WshShell.SendKeys "GET /index.html{ENTER}"
WshShell.SendKeys "User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4{ENTER}"
WshShell.SendKeys "Host: yahoo.com{ENTER}"
WshShell.SendKeys "{ENTER}"
WshShell.SendKeys "{ENTER}"
WScript.Sleep 2000
WshShell.SendKeys "exit{ENTER}" 'close cmd.exit