WSript.Shell 예제 하나를 소개합니다.
Sub WSH_Demo()
'3초간 유지되는 팝업창
Dim SH As Object
Set SH = CreateObject("WScript-x-x.Shell")
SH.Popup "Please Wait...", 1, "Short Message"
MsgBox SH.CurrentDirectory
MsgBox SH.SpecialFolders("StartMenu")
Dim SH1 As Object
Set SH1 = CreateObject("WScript-x-x.Network")
MsgBox SH1.UserName
MsgBox SH1.ComputerName
MsgBox SH1.UserDomain
Dim WshShell As Object
Set WshShell = CreateObject("WScript-x-x.Shell")
strDesktop = WshShell.SpecialFolders("Desktop")
Set oShellLink = WshShell.CreateShortcut(strDesktop & "\야후바로가기.lnk")
oShellLink.TargetPath = "
http://www.yahoo.co.kr"
oShellLink.WindowStyle = 1
oShellLink.Hotkey = "CTRL+SHIFT+Y"
' oShellLink.IconLocation = "notepad.exe, 0"
oShellLink.IconLocation = "C:\Program Files\Internet Explorer\IEXPLORE.EXE, 0"
oShellLink.Descript-x-xion = "야후 바로가는 아이콘"
oShellLink.WorkingDirectory = strDesktop
oShellLink.Save
End Sub
아래자료를 참조하시기 바랍니다.