2016-12-24 182 views
1

我是新手,我編寫了一個批處理程序,當我啓動這個程序時,嘗試使蒸汽,起源,疊加和Battle.net運行。但是它只會啓動他們的CMD,我認爲我做錯了什麼。下面是我的程序:如何在沒有打開cmd的情況下打開steam/etc?

@echo off 
echo starting steam.exe ... 
start "C:\Program Files (x86)\Steam\Steam.exe" 
timeout 2 
echo starting battle.net.exe ... 
start "C:\Program Files (x86)\Steam\Steam.exe" 
timeout 2 
echo starting origin.exe ... 
start "C:\Program Files (x86)\Steam\Steam.exe" 
timeout 2 
echo starting uplay.exe ... 
start "C:\Program Files (x86)\Steam\Steam.exe" 
pause 
+2

你確定要四次啓動完全相同的命令行嗎? – aschipfl

回答

1

嘗試:

@echo off 
echo starting steam.exe ... 
start "" "C:\Program Files (x86)\Steam\Steam.exe" 
timeout 2 

如果放在引號中的第一個參數是the title所以你可以把空引號作爲第一個參數。

+0

它的工作,謝謝你。 :) –

0

只需使用下面的代碼!

echo off 
color 0b 
cls 
echo Starting Steam... 
start C:\Program Files (x86)\Steam\Steam.exe 
timeout 2 
echo Starting battle.net.exe 
start C:\Program Files (x86)\Steam\Steam.exe 
timeout 2 
echo Starting Origin... 
start C:\Program Files (x86)\Steam\Steam.exe 
timeout 2 
echo Starting UPlay... 
start C:\Program Files (x86)\Steam\Steam.exe 
exit 

DO在START命令中沒有使用引號,因爲它不會承認的報價,只是打開一個提升的命令提示符。它也不需要。

相關問題