2009-05-21 23 views
28

.batファイルで同時に2つのアプリケーションを起動するにはどうすればよいですか?私の現在のテキストは、バックグラウンドでexeファイルをキックオフ.batファイル、ノンブロッキング実行/起動

cd mydir 
my.exe 
my.exe difParams 
//bat is finished. i dont want my.exe to close 
+1

受け入れはどうですか? :) – Macke

+1

ああ、申し訳ありません:)。 –

答えて

53
start "MY EXE" my.exe 

(タイトルの問題を回避して、以下を参照)です。

startコマンドは、それらをリストするstart /?を使用して、あまりにもいくつかのオプションを提供しています:

C:>start /? 
Starts a separate window to run a specified program or command. 

START ["title"] [/D path] [/I] [/MIN] [/MAX] [/SEPARATE | /SHARED] 
     [/LOW | /NORMAL | /HIGH | /REALTIME | /ABOVENORMAL | /BELOWNORMAL] 
     [/NODE <NUMA node>] [/AFFINITY <hex affinity mask>] [/WAIT] [/B] 
     [command/program] [parameters] 

    "title"  Title to display in window title bar. 
    path  Starting directory. 
    B   Start application without creating a new window. The 
       application has ^C handling ignored. Unless the application 
       enables ^C processing, ^Break is the only way to interrupt 
       the application. 
    I   The new environment will be the original environment passed 
       to the cmd.exe and not the current environment. 
    MIN   Start window minimized. 
    MAX   Start window maximized. 
    SEPARATE Start 16-bit Windows program in separate memory space. 
    SHARED  Start 16-bit Windows program in shared memory space. 
    LOW   Start application in the IDLE priority class. 
    NORMAL  Start application in the NORMAL priority class. 
    HIGH  Start application in the HIGH priority class. 
    REALTIME Start application in the REALTIME priority class. 
    ABOVENORMAL Start application in the ABOVENORMAL priority class. 
    BELOWNORMAL Start application in the BELOWNORMAL priority class. 
    NODE  Specifies the preferred Non-Uniform Memory Architecture (NUMA) 
       node as a decimal integer. 
    AFFINITY Specifies the processor affinity mask as a hexadecimal number. 
       The process is restricted to running on these processors. 

       The affinity mask is interpreted differently when /AFFINITY and 
       /NODE are combined. Specify the affinity mask as if the NUMA 
       node's processor mask is right shifted to begin at bit zero. 
       The process is restricted to running on those processors in 
       common between the specified affinity mask and the NUMA node. 
       If no processors are in common, the process is restricted to 
       running on the specified NUMA node. 
    WAIT  Start application and wait for it to terminate. 
    command/program 
       If it is an internal cmd command or a batch file then 
       the command processor is run with the /K switch to cmd.exe. 
       This means that the window will remain after the command 
       has been run. 

       If it is not an internal cmd command or batch file then 
       it is a program and will run as either a windowed application 
       or a console application. 

    parameters These are the parameters passed to the command/program. 

トリッキーなビットはそう時々あなたが与える必要があり、「タイトル」は、実行の前に来ると、それはパラメータだということができappを使って引数を正しく解析することができます。 : - |

+0

答えの例の上にtitle属性を追加してください。 – ppasler

+0

完了。 :)チップありがとう。 – Macke

関連する問題