FrankieD
FrankieD

Reputation: 452

Batch coding start command error

I am trying to make a simple batch file to open up my torrent programs but every time I input 1, 2, or 3 for the selection it will open a command prompt titled the file location. Here is my file so far:

title Torrent Hub
@echo off
:MAIN
color F0
echo.
cls
echo Enter the corresponding number to open the following programs.
echo 1.) PeerBlock
echo 2.) BitTorrent
echo 2.) Both

set /p input=
if %input%==1 goto PEERBLOCK
if %input%==2 goto BITTORRENT
if %input%==3 goto BOTH

:PEERBLOCK
cls
echo Opening PeerBlock...
start "C:\Program Files\PeerBlock\peerblock.exe"
timeout /t 5 >nul
goto CLOSE

:BITTORRENT
cls
echo Opening BitTorrent
start "C:\Users\User\AppData\Roaming\BitTorrent\BitTorrent.exe"
timeout /t 5 >nul
goto CLOSE
:BOTH
cls
echo Opening PeerBlock...
start start "C:\Program Files\PeerBlock\peerblock.exe"
timeout /t 2 >nul
echo Opening BitTorrent...
start "C:\Users\User\AppData\Roaming\BitTorrent\BitTorrent.exe"
timeout /t 5 >nul
goto CLOSE

:CLOSE
end

Thanks is advance! ☺

Upvotes: 2

Views: 82

Answers (1)

SachaDee
SachaDee

Reputation: 9545

try with :

start "Loading BitTorrent" "C:\Users\User\AppData\Roaming\BitTorrent\BitTorrent.exe"

or

start "" "C:\Users\User\AppData\Roaming\BitTorrent\BitTorrent.exe"

while the first argument is the title of the windows.

Upvotes: 1

Related Questions