Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to run multiple exe files on an input (NEWBIE)

Status
Not open for further replies.

TechguyMN

IS-IT--Management
Nov 6, 2002
2
US
I want the program to run the application that was entered into the input box. example: to run notepad - the user enters in notepad, but the program is going to run something like "U_Input".exe or something.. can anyone help me? Here's my line of code:


MsgBox "" & U_Input,, "You Entered: "

IF U_Input = "" & U_Input Then

MsgBox "The Program you entered in will now be Launched",, "Thank you! - MicroMania"
Wsh.Run """ & U_Input".exe,,True
 
Not quite sure if I got what you wanted but try this.

Dim wsh
U_Input = "Notepad"
MsgBox "" & U_Input,, "You Entered: "
Set wsh = Wscript.CreateObject("Wscript.Shell")
IF U_Input = "" & U_Input Then

MsgBox "The Program you entered in will now be Launched",, "Thank you! - MicroMania"
Wsh.Run "" & U_Input & ".exe",,True

end if Regards
Steve Friday
 
THANK YOU! THAT WORKED! all i had to do is Wsh.Run "" & U_Input & ".exe",,True and it worked! I knew it was simple! THANKS STEVE!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top