• Jetzt anmelden. Es dauert nur 2 Minuten und ist kostenlos!

Batch Hilfe

tcgmaster

Neues Mitglied
Ich möchte gerne Programme via Batch starten.
Ich habe für soetwas schon ein script,das webseiten aufruft allerdings bekomme ich es nicht hin,dass es programme startet.
Könntet ihr mir helfen?
Hier der Code,um webseiten aufzurufen:

Code:
@ECHO OFF
color 9f
@rem jiinX.2008 @ team2way.de
@echo off
title start@inet
rem (c) jiinX.2008
echo.
:start
echo (1) google.de
echo ----------------------
echo email:
echo (2) gmx.de
set /p weiter=Auswahl:
if %weiter%==email goto email
if %weiter%==email goto chat
if %weiter%==1 goto no1
if %weiter%==2 goto no2
cls
start www.%weiter%
cls
echo.
goto start

:chat
start 
start 
start 
cls
echo.
goto start

:and
cls
echo.
set /p ie=Gib eine page ein:
start https://%ie%
cls
echo.
goto start

:no1 
start www.google.de
cls
echo.
goto start

:no2
start www.gmx.de
cls
echo.
goto start
 
Werbung:
Code:
:start
echo (1) google.de
echo ----------------------
echo email:
echo (2) gmx.de
echo ----------------------
echo (3) Programm1
[...]
if %weiter%==3 goto no3
[...]
:no3
"C:\meinordner\meinprogramm.exe"
cls
echo.
goto start

Ich hab also noch eine dritte Funktion beigefügt. Statt "start xx" einfach nur den Pfad zur Anwendung. Grad getestet und bei Eingabe "3" startete das Programm.

Mfg
 
Hab dir da mal was geschrieben, mir war langeweilig :)
Das klappt so ziemlich. Die "rem" kommentare kannste entvernen wennste willst. Wenn dir was nicht passt kannste es ja umschrieben.

Weiter unten um Script musste deine Programme und den Pfad einsetzen.

Code:
@echo off
rem starter.cmd
rem 21 Juli 2009
rem [email protected]
:start
echo #---------------------------#
echo 1 Starter 1.0               1
echo #---------------------------#
echo Druecke eine Taste zum Start 
if not exist "%Homedrive%\Programme\Internet Explorer\IEXPLORE.exe" goto :fail
pause >NUL
echo.
echo Auswahl:
echo #---------------------------#
echo 1 1. E-Mail Website         1
echo 1 2. Suchmaschiene          1
echo 1 3. Programm               1
echo 1 4. Ende                   1
echo #---------------------------#
set /p wahl_1=Eingabe: 
if %wahl_1%==1 goto wahl_1_1
if %wahl_1%==2 goto wahl_1_2
if %wahl_1%==3 goto wahl_1_3
if %wahl_1%==4 goto end
echo #---------#
echo 1 ERROR   1
echo #---------#
pause >NUL 

:wahl_1_1
echo #---------------------------#
echo 1 1. gmx.de                 1
echo 1 2. web.de                 1
echo 1 3. yahoo mail             1
echo 1 4. Ende                   1
echo #---------------------------#
set /p wahl_2=Eingabe: 
if %wahl_2%==1 goto wahl_2_1
if %wahl_2%==2 goto wahl_2_2
if %wahl_2%==3 goto wahl_2_3
if %wahl_2%==4 goto end
    :wahl_2_1
start "%Homedrive%\Programme\Internet Explorer\IEXPLORE.exe" "http://www.gmx.de"
    :wahl_2_2
start "%Homedrive%\Programme\Internet Explorer\IEXPLORE.exe" "http://www.web.de"
    :wahl_2_3
start "%Homedrive%\Programme\Internet Explorer\IEXPLORE.exe" "http://de.mail.yahoo.com"
goto start
echo #---------#
echo 1 ERROR   1
echo #---------#
pause >NUL 
:wahl_1_2
echo #---------------------------#
echo 1 1. google.de              1
echo 1 2. yahoo.de               1
echo 1 3. bing.de                1
echo 1 4. Ende                   1
echo #---------------------------#
set /p wahl_3=Eingabe: 
if %wahl_3%==1 goto wahl_3_1
if %wahl_3%==2 goto wahl_3_2
if %wahl_3%==3 goto wahl_3_3
if %wahl_3%==4 goto end
    :wahl_3_1
start "%Homedrive%\Programme\Internet Explorer\IEXPLORE.exe" "http://google.de"
    :wahl_3_2
start "%Homedrive%\Programme\Internet Explorer\IEXPLORE.exe" "http://yahoo.de"
    :wahl_3_3
start "%Homedrive%\Programme\Internet Explorer\IEXPLORE.exe" "http://bing.de"
goto start
echo #---------#
echo 1 ERROR   1
echo #---------#
pause >NUL 
:wahl_1_3
echo #---------------------------#
echo 1 1. DeinProgramm           1
echo 1 2. DeinProgramm           1
echo 1 3. AnderesProgramm        1
echo 1 4. Ende                   1
echo #---------------------------#
set /p wahl_3=Eingabe: 
if %wahl_4%==1 goto wahl_4_1
if %wahl_4%==2 goto wahl_4_2
if %wahl_4%==3 goto wahl_4_3
if %wahl_4%==4 goto end
    :wahl_4_1
start "C:\Pfad\Pfad\programm.exe"
    :wahl_4_2
start "C:\Pfad\Pfad\programm.exe"
    :wahl_4_3
set /p pfad=Pfad zum Programm: 
start "%pfad%"
goto start
echo #---------#
echo 1 ERROR   1
echo #---------#
pause >NUL 
exit
:fail
echo Sorry, der Pfad zum Browser stimmt nicht.
echo Bitte im Quellcode ändern.
pause >NUL
exit
:end
echo # Danke fuer die nutzung des starters
echo # -----------------------------------
echo Taste druecken zum beenden.
pause >NUL
exit
 
Werbung:
Zurück
Oben