Search This Blog

Powered By Blogger

Saturday, May 22, 2010

execute a progam

sub shell(cmd)
' Run a command as if you were running from the command line
dim objShell
Set objShell = WScript.CreateObject( "WScript.Shell" )
objShell.Run(cmd)
Set objShell = Nothing
end sub

file_name = inputbox("What file to execute?", "File name?", "c:\boot.ini")

shell file_name

No comments:

Post a Comment