
I will show how to create a Run in vb.net 2005,2008.
Tools
* Combobox
* Button
Code for OK Button:
Dim p As New System.Diagnostics.Process()
if combobox1.text=”” then
msgbox(“You input nothing!”,vbinformation)
else
p = process.start(combobox1.text)
end if
Code for Cancel Button:
End
Code for Browse Button:
Using ofd As New OpenFileDialog()
ofd.Filter = “All files (*.*)|*.*”
If (ofd.ShowDialog(Me) = Windows.Forms.DialogResult.OK) Then
Me.Combobox1.Text = ofd.FileName
End If
End Using
@echo off
title Run
color 2f
echo Run:
:a
set /p n=
start %n%
goto a
Note: Copy the code and save as .bat or .cmd.