'* Copyright (c) sms_solver
'* Date: 4th-Jan-2004
'********************************************************************
' Global declaration
OPTION EXPLICIT
ON ERROR RESUME NEXT
'Script starts from here
Call Main
Sub Main ()
const msg1 = "This is Script which enables you to run any one of"
const msg2 = "following 4 programs:"
const msg3 = "1)Calculator 2)Notepad 3)Paint 4)MineSweeper"
WScript.Echo msg1 & vbcrlf & msg2 & vbcrlf & vbcrlf & msg3
Dim WSHShell
Set WSHShell = CreateObject("Wscript.Shell")
reply = WSHShell.Run(whProg,,true)
End Sub
Private Function whProg()
Dim choice, apName
choice = InputBox("Enter 1 or calc, 2 for notepad, 3 for Paint, 4 for MineSweeper","Give Your Choice")
Select Case choice
Case 1: apName="calc.exe"
Case 2: apName="notepad.exe"
Case 3: apName="mspaint.exe"
case 4: apName="winmine.exe"
Case Else: apName="calc.exe"
End Select
whProg = apName
End Function