1.

Solve : How do I incoporate a RUN command in Batch file??

Answer»

I have a menu in batch FILE which I created but I'm stuck on how to launch the run command (Window's shortcut). In the RUN command the text field is automatically entered (from the batch file) then launch the application or whatever (i.e. msconfig, cmd, or notepad, etc). I using XP version.

I saw someone did this a long long time ago.

Any comments or advice would be greatly appreaciated.

thanksAre you SAYING... If some one types a sertant thing that you want a certant thing to start?

If you are I can help...
(Example)
@ECHO off
title Menu
echo 1.)Notepad
echo 2.)Command Prompt
echo 3.)Internet explorer
set /p Pick=
if "%Pick%"=="1" start notepad.exe
if "%Pick%"=="2" start cmd.exe
if "%Pick%"=="3" start Iexplore "google.com"You're either looking for start like Hibby says. Look throught help file Code: [Select]start /?

or as long as you give the path you can just enter the file name:
Quote

c:\users\public\life.exe

(you can enter just the file name for some things, if you're in the directory with the executable in it, or if the executable is in the path environment variable ex. notepad.exe)

FBI think he wants to literally show the run dialog.

try this command, if that is the case:


Code: [Select]rundll32.exe shell32.dll,#61
Quote from: BC_Programmer on January 25, 2009, 09:41:33 AM
I think he wants to literally show the run dialog.

And, judging by this....

Quote
I'm stuck on how to launch the run command (Window's shortcut). In the RUN command the text field is automatically entered (from the batch file) then launch the application or whatever

.... following that, automagically type in a command and click OK, which is a long winded way of starting an executable from a batch file. Maybe the OP does not realise that you don't need to do that?
I think he means he wants to start the program from run. You know, the thing where you can type in a program name and it starts that program. So if you're going to start it from run you would have to have the extension with it. Like this:

batchfile.bat/exeQuote from: BatchFileCommand on January 25, 2009, 01:21:26 PM
I think he means he wants to start the program from run. You know, the thing where you can type in a program name and it starts that program. So if you're going to start it from run you would have to have the extension with it. Like this:

batchfile.bat/exe

Not quite sure what you're trying to say there, old boy.
I have what I NEEDED. Thank you.Quote from: locbtran on January 25, 2009, 01:46:59 PM
I have what I needed. Thank you.

And what was it?


Discussion

No Comment Found