WSH는 명령 라인에서 스크립트를 실행하거나 full-blown Windows 응용 프로그램으로 스크립트를 실행할 수 있게 해주는 Windows용 배치 파일들의 집합이라 말할 수 있습니다.
Sub SelfGoAway_Msgbox()
'3초간 유지되는 팝업창
Dim SH As Object
Set SH = CreateObject("WScript-x-x.Shell")
SH.Popup "Please Wait...", 3, "Short Message"
End Sub
Sub Notepad_Run()
' 메모장 실행
Dim WshShell As Object
Set WshShell = CreateObject("WScript-x-x.Shell")
' WshShell.Run ("%windir%\notepad.exe")
WshShell.Run ("notepad")
End Sub
Sub NotePad_Run()
'메모장 실행
Dim x
x = Shell("C:\WINNT\notepad.exe", vbNormalFocus)
AppActivate x
End Sub
Sub Calculator_Run()
Dim WshShell As Object
Set WshShell = CreateObject("WScript-x-x.Shell")
WshShell.Exec("calc")
End Sub
Sub Calculator_Run()
'계산기 실행
Dim x
x = Shell("C:\WINNT\system32\calc.exe", vbNormalFocus)
AppActivate x
End Sub