Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Shell 

[Batch] Process Starter and Killer by Hackoo

Hi ✌
Just i want to share with you this batch script with a dynamic menu
So in this batch there are 3 items to choice on the menu
  1. [1] Start a Process or Multi Processes

  2. [2] Kill a Process or Multi Processes

  3. [3] Search for files


PHP Code

<?php 
@Echo off & cls & color 0B
Mode con cols
=72 lines=11
Set TmpFile
=TmpFile.txt
Set Resultat
=KillResult.txt
If Exist %TmpFile% Del %TmpFile%
If 
Exist %Resultat% Del %Resultat%
:
menuLOOP
Mode con cols
=72 lines=11
Cls 
& color 0B
Title Process Starter 
and Killer by Hackoo 2015
echo(
echo(      ==========================
Menu============================
echo(
for /
f "tokens=2* delims=_ " %%A in ('"findstr /b /c:":menu_" "%~f0""') do echo(                %%A  %%B
echo(
echo(      ==========================================================
set choice=
echo( & 
set /p choice=Make a choice or hit ENTER to quit: || GOTO :EOF
echo( & call :menu_[%choice%]
GOTO:
menuLOOP
::********************************************************************************************
:
menu_[1] Start a Process or Multi Processes
cls 
& color 0A
echo(
echo      
Enter the process name or processes names separated by a space
echo(
Set /p "MyProcess=What process(es) do you want to Start ?>"
cls   
echo(           
echo         
The process(es) "%MyProcess%" is launched ...
TimeOut /T 1 /NoBreak>nul
For %%a in (%Myprocess%) Do (Start %%a)
GOTO :
menuLOOP
::********************************************************************************************
:
menu_[2] Kill a Process or Multi Processes
Title Process Killer by Hackoo 2015
cls 
& color 0B
echo(
echo     
Enter the process name or processes names separated by a space
echo(
set /p "process=What process(es) do you want to kill ?>"
cls & color 0C
Title Killing 
"%process%" ...
echo(
echo                       
Killing "%process%" ...
echo(
echo %
date% *** %time% >> %TmpFile%
For %%
a in (%process%) Do Call :KillMyProcess %%a
Cmd 
/U /C Type %TmpFile% > %Resultat%
Start %Resultat%
GOTO :
menuLOOP
::********************************************************************************************
:
menu_[3] Search for files
cls 
& color 0A
echo(
Set /p "Location=Enter the folder location where do you want to serach> "
cls & echo(
echo 
You chose this location "%Location%"
echo(
Set /p "FileName=Enter the file name to looking for> "
Mode con cols=90 lines=11
Set Tmp
=Tmp.txt
Set SearchResult
=SearchResult.txt
echo( & cls
echo(  & echo  Please Wait for moment .... Searching for "%FileName%" on "%Location%"
where /r "%Location%" "%FileName%" > %Tmp%
Cmd /U /C Type %Tmp% > %SearchResult%
Del %Tmp%
Start %SearchResult%
GOTO :
menuLOOP
::*********************************************************************************************
:
KillMyProcess
Taskkill 
/IM "%~n1.exe" /F >> %TmpFile% 2>&1
echo ***************************************************************************** >> %TmpFile%
exit /
b 
::*********************************************************************************************
:
EOF
EXIT 
Hi 🤝
Following to this discussion I made an update to this program

And here is its screenshot :

[img]http://nsm08.casimages.com/img/2015/06/21//15062105323511244313387558.jpg[/img]


The source code :

PHP Code

<?php 
@Echo off & cls & color 0B
Mode con cols
=90 lines=15
Set TmpFile
=TmpFile.txt
Set Resultat
=KillResult.txt
Set MyKey
=HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options
If Exist %TmpFile% Del %TmpFile%
If 
Exist %Resultat% Del %Resultat%
:
menuLOOP
Mode con cols
=90 lines=15
Cls 
& color 0B
Title Process 
(Starter / Killer) and (Enable / Disable) execution of applications by Hackoo 2015
echo(
echo(      ======
Menu======
echo(
for /
f "tokens=2* delims=_ " %%A in ('"findstr /b /c:":menu_" "%~f0""') do echo(      %%A  %%B
echo(
echo(      ======
set choice=
echo( & 
set /p choice=Make a choice or hit ENTER to quit: || GOTO :EOF
echo( & call :menu_[%choice%]
GOTO:
menuLOOP
::******
:
menu_[1] Start a Process or Multi Processes
cls 
& color 0A
echo(
echo      
Enter the process name or processes names separated by a space
echo(
Set /p "MyProcess=What process(es) do you want to Start ?>"
cls   
echo(      
echo      
The process(es) "%MyProcess%" is launched ...
TimeOut /T 1 /NoBreak>nul
For %%a in (%Myprocess%) Do (Start %%a)
GOTO :
menuLOOP
::******
:
menu_[2] Kill a Process or Multi Processes
Title Process Killer by Hackoo 2015
cls 
& color 0B
echo(
echo     
Enter the process name or processes names separated by a space
echo(
set /p "process=What process(es) do you want to kill ?>"
cls & color 0C
Title Killing 
"%process%" ...
echo(
echo             
Killing "%process%" ...
echo(
echo %
date% *** %time% >> %TmpFile%
For %%
a in (%process%) Do Call :KillMyProcess %%a
Cmd 
/U /C Type %TmpFile% > %Resultat%
Start %Resultat%
GOTO :
menuLOOP
::******
:
menu_[3] Search for files
cls 
& color 0A
echo(
Set /p "Location=Enter the folder location where do you want to serach> "
cls & echo(
echo 
You chose this location "%Location%"
echo(
Set /p "FileName=Enter the file name to looking for> "
Mode con cols=90 lines=15
Set Tmp
=Tmp.txt
Set SearchResult
=SearchResult.txt
echo( & cls
echo(  & echo  Please Wait for moment .... Searching for "%FileName%" on "%Location%"
where /r "%Location%" "%FileName%" > %Tmp%
Cmd /U /C Type %Tmp% > %SearchResult%
Del %Tmp%
Start %SearchResult%
GOTO :
menuLOOP
::******
:
KillMyProcess
Taskkill 
/IM "%~n1.exe" /F >> %TmpFile% 2>&1
echo ****** >> %TmpFile%
exit /
b 
::******
:
menu_[4] Disable execution for one application choosen by the user
Mode con cols
=90 lines=15 & Cls & color 0C
echo(
echo 
Enter Application name with its extension to block and disable it like "Chrome.exe"
echo(
Set /p "App=Enter Application name to block and diable it > "
IF [%App%] == [] GOTO:menuLOOP
REG ADD 
"%MyKey%\%App%" /f
REG ADD 
"%MyKey%\%App%" /v Debugger /t REG_SZ /d Block /f
Start 
"" "%App%"
GOTO:menuLOOP
::******
:
menu_[5] Enable execution for one application choosen by the user
Mode con cols
=90 lines=15 & Cls & color 0A
echo(
echo 
Enter Application name with its extension to unblock and enable it like "Chrome.exe"
echo(
Set /p "App=Enter Application name to unblock and enable it> "
IF [%App%] == [] GOTO:menuLOOP
REG ADD 
"%MyKey%\%App%" /f
REG ADD 
"%MyKey%\%App%" /v Debugger /t REG_SZ /d "" /f
Start 
"" "%App%"
GOTO:menuLOOP
::******
:
menu_[6] Disable and block the execution of all Browsers
Mode con cols
=90 lines=15 & Cls & color 0C
Set Browsers
=iexplore.exe firefox.exe chrome.exe opera.exe
For %%a in (%Browsers%) Do Call :BlockExecution %%a
GOTO:menuLOOP
::******
:
menu_[7] Enable and unblock the execution of all Browsers
Mode con cols
=90 lines=15 & Cls & color 0A
Set Browsers
=iexplore.exe firefox.exe chrome.exe opera.exe
For %%a in (%Browsers%) Do Call :UnBlockExecution %%a
GOTO:menuLOOP
::******
:
BlockExecution
REG ADD 
"%MyKey%\%~nx1" /f
REG ADD 
"%MyKey%\%~nx1" /v Debugger /t REG_SZ /d Block /f
Exit /b 
::******
:
UnBlockExecution
REG ADD 
"%MyKey%\%~nx1" /f
REG ADD 
"%MyKey%\%~nx1" /v Debugger /t REG_SZ /d "" /f
Exit /b 
::******
::******
:
EOF
EXIT 
Looks great man 🙂 I will try it - thank you for releasing it 😉
(Jun 21, 2015 11:16 PM)iLogic™ Wrote:  Looks great man 🙂 I will try it - thank you for releasing it 😉
Hi ✌
I add another item on the menu to take screenshots of your applications and of your desktop (Not working on Windows XP)

The Snipping Tool by Microsoft :
The Microsoft Snipping Tool is a reviewer's best friend. This is a little application that might go unnoticed, but I am telling you; it is a time-saver.
This tool allows you to carry out a simple task: take screenshots of your screen. I know there is a button that reads something like Prt Scr in your keyboard and that it will take a screenshot of your screen and take it to the clipboard. There is something better than that. When you activate the Snipping Tool, you can select a part of your screen with your mouse and it will be captured. That capture can either go to the clipboard or to a file. You can even select what type of file you want it to be saved to. I have to get screenshots of applications all the time, and pasting a screen capture into a graphics editor and then cropping it, all it takes me about a minute. I can do the same work in less than 2 seconds.

Please try it from pastebin, i just post it now the Source Code because it is well formatted than here !

Code
@Echo off & cls & color 0B
Mode con cols=90 lines=15
Set TmpFile=TmpFile.txt
Set Resultat=KillResult.txt
Set MyKey=HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options
If Exist %TmpFile% Del %TmpFile%
If Exist %Resultat% Del %Resultat%
:menuLOOP
Mode con cols=90 lines=15
Cls & color 0B
Title Process (Starter / Killer) and (Enable / Disable) execution of applications by Hackoo 2015
echo(
echo(      ======Menu======
echo(
for /f "tokens=2* delims=_ " %%A in ('"findstr /b /c:":menu_" "%~f0""') do echo(      %%A  %%B
echo(
echo(      ======
set choice=
echo( & set /p choice=Make a choice or hit ENTER to quit: || GOTO :EOF
echo( & call :menu_[%choice%]
GOTO:menuLOOP
::******
:menu_[1] Start a Process or Multi Processes
cls & color 0A
echo(
echo      Enter the process name or processes names separated by a space
echo(
Set /p "MyProcess=What process(es) do you want to Start ?>"
cls  
echo(      
echo      The process(es) "%MyProcess%" is launched ...
TimeOut /T 1 /NoBreak>nul
For %%a in (%Myprocess%) Do (Start %%a)
GOTO :menuLOOP
::******
:menu_[2] Kill a Process or Multi Processes
Title Process Killer by Hackoo 2015
cls & color 0B
echo(
echo     Enter the process name or processes names separated by a space
echo(
set /p "process=What process(es) do you want to kill ?>"
cls & color 0C
Title Killing "%process%" ...
echo(
echo      Killing "%process%" ...
echo(
echo %date% *** %time% >> %TmpFile%
For %%a in (%process%) Do Call :KillMyProcess %%a
Cmd /U /C Type %TmpFile% > %Resultat%
Start %Resultat%
GOTO :menuLOOP
::******
:menu_[3] Search for files
cls & color 0A
echo(
Set /p "Location=Enter the folder location where do you want to serach> "
cls & echo(
echo You chose this location "%Location%"
echo(
Set /p "FileName=Enter the file name to looking for> "
Mode con cols=90 lines=15
Set Tmp=Tmp.txt
Set SearchResult=SearchResult.txt
echo( & cls
echo(  & echo  Please Wait for moment .... Searching for "%FileName%" on "%Location%"
where /r "%Location%" "%FileName%" > %Tmp%
Cmd /U /C Type %Tmp% > %SearchResult%
Del %Tmp%
Start %SearchResult%
GOTO :menuLOOP
::******
:KillMyProcess
Taskkill /IM "%~n1.exe" /F >> %TmpFile% 2>&1
echo ****** >> %TmpFile%
exit /b
::******
:menu_[4] Disable execution for one application choosen by the user
Mode con cols=90 lines=15 & Cls & color 0C
echo(
echo Enter Application name with its extension to block and disable it like "Chrome.exe"
echo(
Set /p "App=Enter Application name to block and diable it > "
IF [%App%] == [] GOTO:menuLOOP
REG ADD "%MyKey%\%App%" /f
REG ADD "%MyKey%\%App%" /v Debugger /t REG_SZ /d Block /f
Start "" "%App%"
GOTO:menuLOOP
::******
:menu_[5] Enable execution for one application choosen by the user
Mode con cols=90 lines=15 & Cls & color 0A
echo(
echo Enter Application name with its extension to unblock and enable it like "Chrome.exe"
echo(
Set /p "App=Enter Application name to unblock and enable it> "
IF [%App%] == [] GOTO:menuLOOP
REG ADD "%MyKey%\%App%" /f
REG ADD "%MyKey%\%App%" /v Debugger /t REG_SZ /d "" /f
Start "" "%App%"
GOTO:menuLOOP
::******
:menu_[6] Disable and block the execution of all Browsers
Mode con cols=90 lines=15 & Cls & color 0C
Set Browsers=iexplore.exe firefox.exe chrome.exe opera.exe
For %%a in (%Browsers%) Do Call :BlockExecution %%a
GOTO:menuLOOP
::******
:menu_[7] Enable and unblock the execution of all Browsers
Mode con cols=90 lines=15 & Cls & color 0A
Set Browsers=iexplore.exe firefox.exe chrome.exe opera.exe
For %%a in (%Browsers%) Do Call :UnBlockExecution %%a
GOTO:menuLOOP
::******
:menu_[8] Take screenshots of your applications (Not working on Windows XP)
Start "" snippingtool.exe
GOTO:menuLOOP
::******
:BlockExecution
REG ADD "%MyKey%\%~nx1" /f
REG ADD "%MyKey%\%~nx1" /v Debugger /t REG_SZ /d Block /f
Exit /b
::******
:UnBlockExecution
REG ADD "%MyKey%\%~nx1" /f
REG ADD "%MyKey%\%~nx1" /v Debugger /t REG_SZ /d "" /f
Exit /b
::******
::******
:EOF
EXIT
Using the following combination "ALT+PrtSc" takes a picture only of the focused window.
(Jun 23, 2015 01:46 AM)eXaByte Wrote:  Using the following combination "ALT+PrtSc" takes a picture only of the focused window.

Thank you for this information trick that i don't know it before !
Nice trick 👍


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Shell] by Robert RougeSep 24, 2026 10:02 AM 4 219 Sep 24, 2026 10:02 AM
Last Post: Anonynuk
[Shell] by HackooJun 26, 2022 04:23 PM 9 651 Jun 26, 2022 04:23 PM
Last Post: SetLost
[Shell] by HackooMay 16, 2022 03:26 PM 4 411 May 16, 2022 03:26 PM
Last Post: CD ♪