Hack Forums
[Shell] My first ever batch program, and it works :D (Game Booster) - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [Shell] My first ever batch program, and it works :D (Game Booster) (/showthread.php?tid=5753326)



My first ever batch program, and it works :D (Game Booster) - alnoise - Nov 15, 2017

This is really my first ever real code project, other than the shit we do in school but that doesn't really count. The codes messy, and I don't give a shit because it does what I want it to do. (suggestions would be nice though). I'll leave a download for the .bat but i'll just put the source here. Don't judge it's my first ever project and I had a lot of fun making it.

Some input on it would be really nice.




At the beginning of the video I had 45% and after the program I had 25%, working pretty well :)


.bat download
VirusTotal Scan

Source:
Code
@echo off
goto introduction

:introduction
color 0C
echo =========================================================
echo.
echo RAM Tool made by alnoise, hope you put it to good use :)
echo.
echo =========================================================
echo.
echo.
echo I made this mainly for gaming, but it has other uses for other programs :)
echo.
echo.
echo If an item say's "Not found" when killing the processes, it means it was never open to begin with.
echo.
echo Please don't steal my code, this is my first project and I don't want no fuckin leechers
echo So uh, Alnoise Personal RAM Booster (Copyright Symbol)
echo.
echo.
echo Also, I'll be releasing to HF but that's it because they are cool.
echo.
echo.
pause
cls
goto startup

:startup
color 0B
echo Closing programs to free up RAM, give me a minute.
echo.
echo If you're going to run Razer Cortex game booster, do it before you run this.
echo.
echo.
echo.
echo.
color 0C
set /P c=Do you want to restore files back to normal [R] or boost your PC [B]?
if /I "%c%" EQU "R" goto :restore
if /I "%c%" EQU "B" goto :networktoo

:choice
color 0C
set /P c=Do you want to continue? [Y/N]
if /I "%c%" EQU "Y" goto :networktoo
if /I "%c%" EQU "N" goto :dourshits

:networktoo
color 0C
echo.
echo Would you like to Flush your DNS as well for better latency?
echo.
set /P c=Do you want to Flush your DNS? [Y/N]
if /I "%c%" EQU "Y" goto :flushdns
if /I "%c%" EQU "N" goto :getdatram

:flushdns
echo.
ipconfig /flushdns
echo.
cls
color 0C
set /P c=Do you want to continue to free RAM? [Y/N]
if /I "%c%" EQU "Y" goto :getdatram
if /I "%c%" EQU "N" goto :onlylatency

:getdatram
color 0D
echo.
echo Alright, here we go.
echo.
echo Closing Rainmeter.exe... [1/11]
echo.
echo.
taskkill /f /im rainmeter.exe
timeout /t 5
cls
echo Killed da bitch
echo.
echo Closing Spotify [2/12]
ping -n 5 127.0.0.1 > NUL 2>&1  
echo.
taskkill /F /IM spotify.exe
taskkill /F /IM SpotifyWebHelper.exe
cls
timeout /t 5
echo Spotify.. Spotif-dont have running while playing games.
echo.
echo Closing Razer "Boosting" services. [3/11]
echo.
ping -n 5 127.0.0.1 > NUL 2>&1  
taskkill /IM "RazerCortex.exe" /T /F
taskkill /IM "Razer Central.exe" /T /F
taskkill /IM "GameScannerService" /T /F
taskkill /IM "RazerCentralService.exe" /T /F
taskkill /IM "GameManagerService.exe" /T /F
taskkill /IM "CefSharp.BrowserSubprocess.exe" /T /F
taskkill /IM "GameManagerServiceStartup.exe" /T /F
taskkill /IM "RzStats.exe" /T /F
taskkill /IM "RzKLService.exe" /T /F
taskkill /IM "RzStats.Manager.exe" /T /F
taskkill /IM "RazerIngameEngine.exe" /T /F
taskkill /IM "FPSRunner32.exe" /T /F
taskkill /IM "FPSRunner64.exe" /T /F
taskkill /IM "GamecasterViewer.exe" /T /F
taskkill /IM "CortexLauncher.exe" /T /F
taskkill /IM "PMRunner32.exe" /T /F
taskkill /IM "PMRunner64.exe" /T /F
taskkill /IM "ProcessCapturer.exe" /T /F
timeout /t 5
cls
echo.
echo Razer really needs to fix their shit.
echo.
echo Do you know how many things it runs in the background? A Lot.
echo and p.s, the Game Booster Overlay is shit and causes FPS drops. So be careful.
echo.
echo Anyways, killing Chrome. [4/11]
echo.
ping -n 5 127.0.0.1 > NUL 2>&1
echo.
taskkill /F /IM chrome.exe
cls
echo Use Firefox.
timeout /t 3
echo.
echo Disabling some Anti-Malware RAM hogging shit. [5/11]
echo.
ping -n 5 127.0.0.1 > NUL 2>&1
taskkill /F /TM MBAMService.exe
taskkill /F /IM malwarebytes_assistant.exe
taskkill /F /IM assistant.exe
taskkill /F /IM mbam.exe
taskkill /F /IM mbamtray.exe
taskkill /F /IM mbamwow.exe
taskkill /F /IM MBAMWsc.exe
timeout /t 5
cls
echo.
echo Killing extra background programs. [6/11]
echo.
timeout /t 5
ping -n 5 127.0.0.1 > NUL 2>&1
net.exe stop superfetch
taskkill /F /IM AgileBits.OnePassword.Desktop.exe
taskkill /F /IM Cortana.exe
taskkill /F /IM SearchUI
taskkill /F /IM MsMpEng
taskkill /F /IM RuntimeBroker.exe
taskkill /F /IM spoolsv.exe
taskkill /F /IM CCleaner64.exe
taskkill /F /IM reader_sl.exe
taskkill /F /IM jqs.exe
taskkill /F /IM Osa.exe
taskkill /F /IM soffice.exe
taskkill /F /IM smartscreen.exe
timeout /t 5
cls
echo.
echo Done with the side hoes...
echo.
echo Closing background Software-Updates. [7/11]
echo.
ping -n 5 127.0.0.1 > NUL 2>&1
taskkill /IM "AdobeARM.exe" /T /F
taskkill /IM "AAM Update Notifier.exe" /T /F
taskkill /IM "Jusched.exe" /T /F
taskkill /IM "DivXUpdate.exe" /T /F
timeout /t 5
cls
echo.
echo Killed Those shits.
echo.
echo Now for the real RAM eaters... (Processes from hardware) [8/11]
echo.
ping -n 5 127.0.0.1 > NUL 2>&1
taskkill /F /IM NeroCheck.exe
taskkill /F /IM HKCMD.exe
taskkill /F /IM atiptaxx.exe/ati2evxx.exe
taskkill /F /IM RAVCpl64.exe
taskkill /F /IM Nwiz.exe
taskkill /F /IM CCC.exe
taskkill /F /IM SynTPEnh.exe
timeout /t 5
cls
echo.
echo Almost done, now time for Software Processes. [9/11]
echo.
ping -n 5 127.0.0.1 > NUL 2>&1
taskkill /F /IM winampa.exe
taskkill /F /IM iTunesHelper.exe
taskkill /F /IM OSPPSVC.exe
timeout /t 3
cls
echo.
echo And now for the Windows Processes. [10/11]
echo.
ping -n 5 127.0.0.1 > NUL 2>&1
taskkill /F /IM Siddebar.exe
taskkill /F /IM wmpnetwk.exe
timeout /t 3
cls
echo.
echo Now it's time for the services, last thing in v1. [11/11]
//HERE
echo.
ping -n 5 127.0.0.1 > NUL 2>&1
net stop Bonjour Service
echo.
net stop [BITS
echo.
net stop HomeGroup Provider
echo.
net stop HomeGroup Listener
echo.
net stop MBAMService
echo.
net stop NcbService
echo.
net stop Spooler
echo.
net stop RmSvc
echo.
net stop Razer Game Scanner Service
echo.
net stop ShellHWDetection
echo.
net stop OneSyncSvc_44ee3
echo.
net stop SENS
echo.
net stop Schedule
echo.
net stop Themes
echo.
net stop TabletInputService
echo.
net stop TokenBroker
echo.
net stop SDRSVC
echo.
net stop WdNisSvc
echo.
net stop WinDefend
echo.
net stop MpsSvc
echo.
net stop SecurityHealthService
echo.
net stop stisvc
echo.
net stop WpnService
echo.
net stop WpnUserService_44ee3
echo.
net stop WSearch
echo.
cls
//TO HERE
echo.
echo Sorry about the wait fam, we cleanin' some shit up.
echo.
echo.
echo.
echo In a future update you will be able to turn everything back on with the same batch file! Ain't that something.
echo.
echo But for now, that's at least 100 processes and programs that were closed freeing as much ram as possible. Thanks for using my tool :)
echo.
echo.
timeout /t 5
cls
exit

:dourshits
color 0C
echo Go run your shit then mate.
timeout /t 5
exit

:onlylatency
color 02
echo Enjoy the amount of lag you have lost :)
timeout /t 5
exit

//Now for the part I don't want to do :D

:restore
@echo off
color 02
echo.
echo Please wait a few moments while I restore your PC :)
echo.
echo.
cls
color 02
echo Re-Opening Applications [1/2]
timeout /t 3
echo.
cls
cd "C:\Program Files\Rainmeter"
start Rainmeter.exe
timeout /t 1
cls
cd "C:\Users\Zach\AppData\Roaming\Spotify"
start Spotify.exe
timeout /t 1
cls
cd "C:\Program Files (x86)\Google\Chrome\Application"
start Chrome.exe
timeout /t 1
cls
net.exe start superfetch
timeout /t 1
cls
echo.
echo Done opening applications, time for services. [2/2]
echo.
timeout /t 3
cls
echo.
ping -n 5 127.0.0.1 > NUL 2>&1
net start Bonjour Service
timeout /t 1
net start BITS
timeout /t 1
net start HomeGroup Provider
timeout /t 1
net start HomeGroup Listener
timeout /t 1
net start MBAMService
timeout /t 1
net start NcbService
timeout /t 1
net start Spooler
timeout /t 1
net start RmSvc
timeout /t 1
net start Razer Game Scanner Service
timeout /t 1
net start ShellHWDetection
timeout /t 1
net start OneSyncSvc_44ee3
timeout /t 1
net start SENS
timeout /t 1
net start Schedule
timeout /t 1
net start Themes
timeout /t 1
net start TabletInputService
timeout /t 1
net start TokenBroker
timeout /t 1
net start SDRSVC
timeout /t 1
net start WdNisSvc
timeout /t 1
net start WinDefend
timeout /t 1
net start MpsSvc
timeout /t 1
net start SecurityHealthService
timeout /t 1
net start stisvc
timeout /t 1
net start WpnService
timeout /t 1
net start WpnUserService_44ee3
timeout /t 1
net start WSearch
timeout /t 1
echo.
cls
echo.
echo Everything is back to normal, I hope this helped :)
echo.
echo.
timeout /t 5
exit


I made this because I have been wanting someone to make a program that closes specific programs for a certain amount of time for a very long time now so I decided I would give it a go. No copy pasta and hardly any google  🙂. I'm feeling pretty proud of myself rn.

Edit: Fuck Razer Cortex


RE: My first ever batch program, and it works :D (Game Booster) - /wrists - Nov 15, 2017

code will be ripped 4 sure. nice though.


RE: My first ever batch program, and it works :D (Game Booster) - alnoise - Nov 15, 2017

(Nov 15, 2017 03:22 PM)fatalist Wrote:  code will be ripped 4 sure. nice though.

I don't really care :/ it's my first program so it was really just practice. I'm working on something a lot better right now.

Thank you though took me a couple hours haha


RE: My first ever batch program, and it works :D (Game Booster) - ɩᴄᴀʀᴜȿ ᴌוᴠᴇѕ™ - Nov 15, 2017

Trust me it's not worth leeching material like this. So I wouldn't concern yourself too much. Perhaps have a look at some of my threads for insight. Perhaps you may learn a new trick? Good luck to you sir


RE: My first ever batch program, and it works :D (Game Booster) - Effexion - Nov 15, 2017

OP said no copy pasta so he has my respect. I am learning another language at the minute as my first and was proud as fuckery of my list format tool and spammer. Keep it up and steer well clear of that C&P, it will teach you diddly squat.


RE: My first ever batch program, and it works :D (Game Booster) - alnoise - Nov 15, 2017

(Nov 15, 2017 04:14 PM)ɩᴄᴀʀᴜȿ ᴌוᴠᴇѕ™ Wrote:  Trust me it's not worth leeching material like this. So I wouldn't concern yourself too much. Perhaps have a look at some of my threads for insight. Perhaps you may learn a new trick? Good luck to you sir

I definitely will thank you :)


RE: My first ever batch program, and it works :D (Game Booster) - userU - Nov 16, 2017

This is a good first project. Keep on going.


RE: My first ever batch program, and it works :D (Game Booster) - Manks - Nov 16, 2017

Not much to look at
It's more or less the same functions used, over and over again.
Congrats, nonetheless.


RE: My first ever batch program, and it works :D (Game Booster) - alnoise - Nov 16, 2017

(Nov 16, 2017 06:49 AM)Manks Wrote:  Not much to look at
It's more or less the same functions used, over and over again.
Congrats, nonetheless.
Yeah it really is, still proud it works. The hardest part was probably finding the processes to kill.

(Nov 16, 2017 06:45 AM)userU Wrote:  This is a good first project. Keep on going.

Thank you :)


RE: My first ever batch program, and it works :D (Game Booster) - malhalath - Nov 21, 2017

Thanks this thread was super helpful <3


RE: My first ever batch program, and it works :D (Game Booster) - alnoise - Nov 21, 2017

(Nov 21, 2017 07:44 AM)malhalath Wrote:  Thanks this thread was super helpful <3

No problem :D
Even though I wouldn't use this code for anything big. It's my first project so the code is shitty and messy.