HankHell Posted January 25, 2018 Share Posted January 25, 2018 just figured I'd contribute a little bit to the site. this has been an on-going project I made through the past year. there are some interesting pieces of code in it that I'm sure someone on the forums will enjoy. Feel free to crop out anything you need. I am also open to suggestions as to what else to add to it. expandcollapse popup@echo off REM mdsched.exe REM wmic useraccount get name,sid REM http://ccm.net/faq/2471-how-to-purge-the-windows-update-cache REM https://support.microsoft.com/en-gb/help/971058/how-do-i-reset-windows-update-components REM ------------- REM Driver Signature Enforcement REM bcdedit /set testsigning on REM shutdown /r REM bcdedit /set testsigning off REM ------------- REM msiexec /unreg msiexec /regserver REM dir /s /b /o:e *.txt REM SERVICES add view disabled services REM mark/unmark files as read only NEW OPTION REM add details how to UNBLOCK website saveas all files replace hosts.file REM select disk number on which you would like to create the new volume - HDD OPTIONS REM change Forcefully_end_process to Background_Processes REM HIDE UNHIDE VOLUME - list volume > select volume 1 > assign (letter) - remove letter (letter) REM open services.msc xmgsbox be sure to know what you are doing before making changes, disabling certain services may harm your system! REM windows dark theme REM add volume opions under hdd options REM folder registery hack to make all files show in "details" list instead of showing pictures by default REM under Misc add arguments, mklink/d needs revert option REM turn energy report into power options REM partition manager detail disk REM make ntfs vbs REM sc /? service control command sc query state= all sc query sc config "Name of Service" start= disabled REM fix all_cmd_commands - add option menu REM net stop alerter REM if ERRORLEVEL 1 goto error REM exit REM :error REM echo Unable to Stop service %userinp REM REM add power options, powercfg, gpresult /scope computer /v REM select disk, clean, create partition primary, primary extended logical, REM http://www.disk-partition.com/diskpart/create-partition-4125.html REM REM https://www.youtube.com/watch?v=gojkN9qebG4 REM put CHKDSK "check disk for errors" into HDDOptions, add gpt and mbr options format REM file name ref %~nx0 SETLOCAL EnableDelayedExpansion for /F "tokens=1,2 delims=#" %%a in ('"prompt #$H#$E# & echo on & for %%b in (1) do rem"') do ( set "DEL=%%a" ) mode 75,45 powershell -command "&{$H=get-host;$W=$H.ui.rawui;$B=$W.buffersize;$B.width=2000%3;$B.height=3000%4;$W.buffersize=$B;}" color 0E :menu cls For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set thedate=%%a/%%b/%%c) For /f "tokens=1-2 delims=/:" %%a in ('time /t') do (set thetime=%%a:%%b) echo %thedate% %thetime% call :colorEcho 0B "FixerUpper ver. Alpha3.2" echo. call :colorEcho 0B "------------------------" echo. call :colorEcho 0B " Created by HankHell" echo. echo. call :colorEcho 0C " if you have trouble viewing" echo. call :colorEcho 0C " the entire text, rightclick" echo. call :colorEcho 0C " at the top of the CMD window" echo. call :colorEcho 0C " Properties, Layout, Screen Buffer Size" echo. call :colorEcho 0C " Width - 500 Height - 2500" echo. call :colorEcho 0A " Rightclick and Run as Administrator to avoid errors" echo. call :colorEcho 0F " Commands can be interrupted with Ctrl + C" echo. REM changing the Screen Buffer Size will also allow you to maximize and resize the command window as well being able to view more text >nul call :colorEcho 0D " This program was written for Windows 7 Ultimate (x64)" echo. REM runas /user:administrator C:\fixerupper.bat >nul REM Will work with other Windows Operating Systems >nul :skipintro title FixerUpper echo. echo. echo Hello, %username% echo ............................................... echo What would you like to do? echo ............................................... echo. echo ------------------------------------------------------------------------- call :colorEcho 0F "1 - Refresh_Browser" echo. call :colorEcho 0F " 2 - Delete_Temp_Files" echo. call :colorEcho 0F "3 - Forcefully_End_a_Process" echo. call :colorEcho 0F " 4 - HDD_Options - NEED SETUP" echo. call :colorEcho 0F "5 - Bypass_CMD" echo. call :colorEcho 0F " 6 - Repair_Windows_Files" echo. call :colorEcho 0F "7 - Defrag" echo. call :colorEcho 0F " 8 - Energy_Report" echo. call :colorEcho 0F "9 - All_CMD_Commands" echo. call :colorEcho 0F " 10 - Hide_Unhide_Files" echo. call :colorEcho 0F "11 - Network_and_WiFi" echo. call :colorEcho 0F " 12 - User_Accounts" echo. call :colorEcho 0F "13 - Firewall_Options - NEED SETUP" echo. call :colorEcho 0F " 14 - Block_Website" echo. call :colorEcho 0F "15 - Services" echo. call :colorEcho 0F " 16 - " echo. call :colorEcho 0F "17 - " echo. call :colorEcho 0F " 18 - " echo. call :colorEcho 0F "19 - Terms_of_Service" echo. call :colorEcho 0F " 20 - Misc" echo. echo ------------------------------------------------------------------------- echo. set /P M=Use 123 keys to make your selection: echo. if %M%==1 goto Refresh_Browser if %M%==2 goto Delete_Temp_Files if %M%==3 goto Forcefully_End_a_Process if %M%==4 goto HDD_Options if %M%==5 goto Bypass_CMD REM if %M%==6 goto Edit if %M%==6 goto Repair_Windows_Files if %M%==7 goto Defrag if %M%==8 goto Energy_Report if %M%==9 goto All_CMD_Commands if %M%==10 goto Hide_Unhide_Files if %M%==11 goto Network_and_WiFi if %M%==12 goto User_Account if %M%==13 goto Firewall_Options if %M%==14 goto Block_Website if %M%==15 goto Services if %M%==16 goto 16 if %M%==17 goto 17 if %M%==18 goto 18 if %M%==19 goto Terms_of_Service if %M%==20 goto Misc goto menu REM ------------------------------------------------------------------------------------------------------------------------ :Refresh_Browser cls echo Working... ping -n 3 127.0.0.1>nul :CLS_Refresh_Browser cls :Skip_CLS_Refresh_Browser echo. call :colorEcho 0A " ---------------" echo. echo Refresh Browser call :colorEcho 0A " ---------------" echo. echo. call :colorEcho 0F "1 - Display DNS Entries (includes Hosts.file entries)" echo. call :colorEcho 0F "2 - Refresh Browser" echo. echo. call :colorEcho 0F "3 - Cancel" echo. echo. set /P M=Use 123 keys to make your selection: echo. if %M%==1 goto Display_DNS_Entries if %M%==2 goto Start_Refresh if %M%==3 goto END goto CLS_Refresh_Browser :Display_DNS_Entries cls echo ----------------- echo DNS CACHE ENTRIES echo ----------------- echo. ipconfig /displaydns goto Skip_CLS_Refresh_Browser :Start_Refresh call :colorEcho 0a "----------------------------------------------------------------------" echo. echo C:\Windows\System32\drivers\etc\hosts.file entries will not be cleared call :colorEcho 0a "----------------------------------------------------------------------" echo. echo. ipconfig /flushdns ipconfig /registerdns echo. net stop dnscache net start dnscache goto Skip_CLS_Refresh_Browser REM ------------------------------------------------------------------------------------------------------------------------ :Delete_Temp_Files cls echo Working... ping -n 3 127.0.0.1>nul :CLS_Delete_Temp_Files cls :Skip_CLS_Delete_Temp_Files echo. call :colorEcho 0A " -----------------" echo. echo Delete Temp Files call :colorEcho 0A " -----------------" echo. echo. call :colorEcho 0F "1 - Delete Temp Files" echo. call :colorEcho 0F "2 - View Temp Files" echo. echo. call :colorEcho 0F "3 - Cancel" echo. echo. set /P M=Use 123 keys to make your selection: echo. if %M%==1 goto Delete_Tmp if %M%==2 goto View_Tmp if %M%==3 goto END goto CLS_Delete_Temp_Files :Delete_Tmp cls call :MessageBox "This program is running in a Temp directory and will close" "FixerUpper" call :YesNoBox "Are you sure you would like to delete Temp files?" "FixerUpper" if "%YesNo%"=="6" ( goto Confirm_Delete_Tmp exit /b ) if "%YesNo%"=="7" ( call :MessageBox "Operation Cancelled" "FixerUpper" goto CLS_Delete_Temp_Files exit /b ) :Confirm_Delete_Tmp echo Temp Files Deleted echo. cd /d %temp% for /F "delims=" %%i in ('dir /b') do (rmdir "%%i" /s/q || del "%%i" /s/q) cd /d %tmp% for /F "delims=" %%i in ('dir /b') do (rmdir "%%i" /s/q || del "%%i" /s/q) goto Skip_CLS_Delete_Temp_Files :View_Tmp cd %temp% dir cd %tmp% dir goto Skip_CLS_Delete_Temp_Files REM ------------------------------------------------------------------------------------------------------------------------ :Forcefully_End_a_Process cls echo Working... ping -n 3 127.0.0.1>nul cls echo PC Name: hostname echo. echo Username: echo %username% echo. echo Active Tasks tasklist /v netstat -ano :Skip_CLS_Forcefully_End_a_Process echo. call :colorEcho 0A " ------------------------" echo. echo Forcefully End a Process call :colorEcho 0A " ------------------------" echo. echo. call :colorEcho 0F "1 - End a Single Process" echo. call :colorEcho 0F "2 - End a Process Tree" echo. echo. call :colorEcho 0F "3 - Additional Process Info" echo. echo. call :colorEcho 0F "4 - Cancel" echo. echo. set /P M=Use 123 keys to make your selection: echo. if %M%==1 goto End_Process if %M%==2 goto End_Process_Tree if %M%==3 goto Process_Info if %M%==4 goto END goto Skip_CLS_Forcefully_End_a_Process :End_Process set /p UserInputPath=Input the PID Number of the associated Process: echo. taskkill /pid %UserInputPath% /f goto Skip_CLS_Forcefully_End_a_Process :End_Process_Tree set /p UserInputPath=Input the name.exe of the Process: echo. taskkill /F /IM %UserInputPath% goto Skip_CLS_Forcefully_End_a_Process :Process_Info call :colorEcho 0D "Search by using the PID column on either Active Tasks or Active Connections" echo. echo. call :colorEcho 0A "1-3 digit numbers are system processes (ignore)" echo. call :colorEcho 0A "4 digit numbers are programs and their associated port" echo. echo. set /p UserInputPath=Input the PID Number of the IP connection or process: echo. call :colorEcho 0A "------------------------------------------------------------------------------------" echo. tasklist /v | findstr %UserInputPath% netstat -ano | findstr %UserInputPath% call :colorEcho 0A "------------------------------------------------------------------------------------" echo. goto Skip_CLS_Forcefully_End_a_Process REM ------------------------------------------------------------------------------------------------------------------------ :HDD_Options cls echo Working... ping -n 3 127.0.0.1>nul :CLS_HDD_Options cls :Skip_CLS_HDD_Options echo. call :colorEcho 0A " -----------" echo. echo HDD Options call :colorEcho 0A " -----------" echo. echo. call :colorEcho 0F "1 - Partition Manager - NEED SETUP" echo. call :colorEcho 0F "2 - Benchmark a HDD" echo. call :colorEcho 0F "3 - Check Disk for errors" echo. echo. call :colorEcho 0F "4 - Cancel" echo. echo. set /P M=Use 123 keys to make your selection: echo. if %M%==1 goto Partition_Manager if %M%==2 goto Benchmark_HDD if %M%==3 goto Windows_Check_Disk if %M%==4 goto END goto CLS_HDD_Options :Partition_Manager cls :Skip_CLS_Partition_Manager echo. call :colorEcho 0A " -----------------" echo. echo Partition Manager call :colorEcho 0A " -----------------" echo. echo. call :colorEcho 0F "1 - List HDDs" echo. call :colorEcho 0F "2 - Format a Drive (Options)" echo. call :colorEcho 0F "3 - Assign Drive Letter - NOT SETUP" echo. echo. call :colorEcho 0F "4 - Cancel" echo. echo. set /P M=Use 123 keys to make your selection: echo. if %M%==1 goto List_HDD if %M%==2 goto Format_HDD if %M%==3 goto Assign_Drive_Letter if %M%==4 goto CLS_HDD_Options goto Partition_Manager goto Skip_CLS_Partition_Manager :List_HDD echo.>"%temp%\FixerUpperListDisk.txt" echo list volume > "%temp%\FixerUpperListDisk.txt" diskpart /s "%temp%\FixerUpperListDisk.txt" > "%temp%\FixerUpperDiskpartListDisk.txt" type "%temp%\FixerUpperDiskpartListDisk.txt" echo. del /f "%temp%\FixerUpperListDisk.txt" del /f "%temp%\FixerUpperDiskpartListDisk.txt" goto Skip_CLS_Partition_Manager :Format_HDD cls call :colorEcho 0D "These commands can also be used to fix broken drives" echo. echo. call :colorEcho 0A " --------------" echo. echo Format a Drive call :colorEcho 0A " --------------" echo. echo. call :colorEcho 0F "1 - Format to NTFS (Windows OS Requirement)" echo. call :colorEcho 0F "2 - Format to FAT (Better for Storage)" echo. call :colorEcho 0F "3 - Format to FAT32 (Better for Storage)" echo. call :colorEcho 0F "4 - Format to ExFAT (Macintosh compatible)" echo. echo. call :colorEcho 0F "5 - Cancel" echo. echo. set /P M=Use 123 keys to make your selection: echo. if %M%==1 goto Format_NTFS if %M%==2 goto Format_FAT if %M%==3 goto Format_FAT32 if %M%==4 goto Format_ExFAT if %M%==5 goto Partition_Manager goto Format_HDD goto Skip_CLS_Partition_Manager :Format_NTFS cls echo. call :colorEcho 0A " --------------" echo. echo Format to NTFS call :colorEcho 0A " --------------" echo. echo.>"%temp%\FixerUpperListDisk.txt" echo list disk > "%temp%\FixerUpperListDisk.txt" diskpart /s "%temp%\FixerUpperListDisk.txt" > "%temp%\FixerUpperDiskpartListDisk.txt" type "%temp%\FixerUpperDiskpartListDisk.txt" echo. echo.>"%temp%\FixerUpperFormatNTFS.txt" set /p UserInputPath1=Select Disk Number: echo select disk %UserInputPath1% > "%temp%\FixerUpperFormatNTFS.txt" diskpart /s "%temp%\FixerUpperFormatNTFS.txt" > "%temp%\FixerUpperDiskpartFormatNTFS.txt" type "%temp%\FixerUpperDiskpartFormatNTFS.txt" echo. call :colorEcho 0D "-----------------------------------------------------" echo. echo Are you sure you would like to FORMAT DISK %UserInputPath1% to NTFS? call :colorEcho 0D "-----------------------------------------------------" echo. echo. call :colorEcho 0C "Formatting will erase all data on the selected drive" echo. echo. call :colorEcho 0F "1 - Yes" echo. call :colorEcho 0F "2 - No" echo. echo. set /P M=Use 123 keys to make your selection: echo. if %M%==1 goto Yes_Format_NTFS if %M%==2 goto Skip_CLS_Format_HDD goto Format_NTFS goto Skip_CLS_Partition_Manager :Yes_Format_NTFS echo select disk %UserInputPath1% > "%temp%\FixerUpperYesNTFS.txt" echo clean > "%temp%\FixerUpperYesNTFS.txt" echo create partition primary > "%temp%\FixerUpperYesNTFS.txt" echo format fs=NTFS quick > "%temp%\FixerUpperYesNTFS.txt" diskpart /s "%temp%\FixerUpperYesNTFS.txt" > "%temp%\FixerUpperDiskpartYesNTFSResult.txt" type "%temp%\FixerUpperDiskpartYesNTFSResult.txt" del /f "%temp%\FixerUpperListDisk.txt" del /f "%temp%\FixerUpperDiskpartListDisk.txt" del /f "%temp%\FixerUpperFormatNTFS.txt" del /f "%temp%\FixerUpperDiskpartFormatNTFS.txt" del /f "%temp%\FixerUpperYesNTFS.txt" del /f "%temp%\FixerUpperDiskpartYesNTFSResult.txt" echo. goto Skip_CLS_Partition_Manager :Format_FAT cls echo. call :colorEcho 0A " -------------" echo. echo Format to FAT call :colorEcho 0A " -------------" echo. echo.>"%temp%\FixerUpperListDisk.txt" echo list disk > "%temp%\FixerUpperListDisk.txt" diskpart /s "%temp%\FixerUpperListDisk.txt" > "%temp%\FixerUpperDiskpartListDisk.txt" type "%temp%\FixerUpperDiskpartListDisk.txt" echo. echo.>"%temp%\FixerUpperFormatFAT.txt" set /p UserInputPath1=Select Disk Number: echo select disk %UserInputPath1% > "%temp%\FixerUpperFormatFAT.txt" diskpart /s "%temp%\FixerUpperFormatFAT.txt" > "%temp%\FixerUpperDiskpartFormatFAT.txt" type "%temp%\FixerUpperDiskpartFormatFAT.txt" echo. call :colorEcho 0D "----------------------------------------------------" echo. echo Are you sure you would like to FORMAT DISK %UserInputPath1% to FAT? call :colorEcho 0D "----------------------------------------------------" echo. echo. call :colorEcho 0C "Formatting will erase all data on the selected drive" echo. echo. call :colorEcho 0F "1 - Yes" echo. call :colorEcho 0F "2 - No" echo. echo. set /P M=Use 123 keys to make your selection: echo. if %M%==1 goto Yes_Format_FAT if %M%==2 goto Skip_CLS_Format_HDD goto Format_FAT goto Skip_CLS_Partition_Manager :Yes_Format_FAT echo select disk %UserInputPath1% > "%temp%\FixerUpperYesFAT.txt" echo clean > "%temp%\FixerUpperYesFAT.txt" echo create partition primary > "%temp%\FixerUpperYesFAT.txt" echo format fs=FAT quick > "%temp%\FixerUpperYesFAT.txt" diskpart /s "%temp%\FixerUpperYesFAT.txt" > "%temp%\FixerUpperDiskpartYesFATResult.txt" type "%temp%\FixerUpperDiskpartYesFATResult.txt" del /f "%temp%\FixerUpperListDisk.txt" del /f "%temp%\FixerUpperDiskpartListDisk.txt" del /f "%temp%\FixerUpperFormatFAT.txt" del /f "%temp%\FixerUpperDiskpartFormatFAT.txt" del /f "%temp%\FixerUpperYesFAT.txt" del /f "%temp%\FixerUpperDiskpartYesFATResult.txt" echo. goto Skip_CLS_Partition_Manager :Format_FAT32 cls echo. call :colorEcho 0A " ---------------" echo. echo Format to FAT32 call :colorEcho 0A " ---------------" echo. echo.>"%temp%\FixerUpperListDisk.txt" echo list disk > "%temp%\FixerUpperListDisk.txt" diskpart /s "%temp%\FixerUpperListDisk.txt" > "%temp%\FixerUpperDiskpartListDisk.txt" type "%temp%\FixerUpperDiskpartListDisk.txt" echo. echo.>"%temp%\FixerUpperFormatFAT32.txt" set /p UserInputPath1=Select Disk Number: echo select disk %UserInputPath1% > "%temp%\FixerUpperFormatFAT32.txt" diskpart /s "%temp%\FixerUpperFormatFAT32.txt" > "%temp%\FixerUpperDiskpartFormatFAT32.txt" type "%temp%\FixerUpperDiskpartFormatFAT32.txt" echo. call :colorEcho 0D "------------------------------------------------------" echo. echo Are you sure you would like to FORMAT DISK %UserInputPath1% to FAT32? call :colorEcho 0D "------------------------------------------------------" echo. echo. call :colorEcho 0C "Formatting will erase all data on the selected drive" echo. echo. call :colorEcho 0F "1 - Yes" echo. call :colorEcho 0F "2 - No" echo. echo. set /P M=Use 123 keys to make your selection: echo. if %M%==1 goto Yes_Format_FAT32 if %M%==2 goto Skip_CLS_Format_HDD goto Format_FAT32 goto Skip_CLS_Partition_Manager :Yes_Format_FAT32 echo select disk %UserInputPath1% > "%temp%\FixerUpperYesFAT32.txt" echo clean > "%temp%\FixerUpperYesFAT32.txt" echo create partition primary > "%temp%\FixerUpperYesFAT32.txt" echo format fs=FAT32 quick > "%temp%\FixerUpperYesFAT32.txt" diskpart /s "%temp%\FixerUpperYesFAT32.txt" > "%temp%\FixerUpperDiskpartYesFAT32Result.txt" type "%temp%\FixerUpperDiskpartYesFAT32Result.txt" del /f "%temp%\FixerUpperListDisk.txt" del /f "%temp%\FixerUpperDiskpartListDisk.txt" del /f "%temp%\FixerUpperFormatFAT32.txt" del /f "%temp%\FixerUpperDiskpartFormatFAT32.txt" del /f "%temp%\FixerUpperYesFAT32.txt" del /f "%temp%\FixerUpperDiskpartYesFAT32Result.txt" echo. goto Skip_CLS_Partition_Manager :Format_ExFAT cls echo. call :colorEcho 0A " ---------------" echo. echo Format to ExFAT call :colorEcho 0A " ---------------" echo. echo.>"%temp%\FixerUpperListDisk.txt" echo list disk > "%temp%\FixerUpperListDisk.txt" diskpart /s "%temp%\FixerUpperListDisk.txt" > "%temp%\FixerUpperDiskpartListDisk.txt" type "%temp%\FixerUpperDiskpartListDisk.txt" echo. echo.>"%temp%\FixerUpperFormatExFAT.txt" set /p UserInputPath1=Select Disk Number: echo select disk %UserInputPath1% > "%temp%\FixerUpperFormatExFAT.txt" diskpart /s "%temp%\FixerUpperFormatExFAT.txt" > "%temp%\FixerUpperDiskpartFormatExFAT.txt" type "%temp%\FixerUpperDiskpartFormatExFAT.txt" echo. call :colorEcho 0D "------------------------------------------------------" echo. echo Are you sure you would like to FORMAT DISK %UserInputPath1% to ExFAT? call :colorEcho 0D "------------------------------------------------------" echo. echo. call :colorEcho 0C "Formatting will erase all data on the selected drive" echo. echo. call :colorEcho 0F "1 - Yes" echo. call :colorEcho 0F "2 - No" echo. echo. set /P M=Use 123 keys to make your selection: echo. if %M%==1 goto Yes_Format_ExFAT if %M%==2 goto Skip_CLS_Format_HDD goto Format_ExFAT goto Skip_CLS_Partition_Manager :Yes_Format_ExFAT echo select disk %UserInputPath1% > "%temp%\FixerUpperYesExFAT.txt" echo clean > "%temp%\FixerUpperYesExFAT.txt" echo create partition primary > "%temp%\FixerUpperYesExFAT.txt" echo format fs=ExFAT quick > "%temp%\FixerUpperYesExFAT.txt" diskpart /s "%temp%\FixerUpperYesExFAT.txt" > "%temp%\FixerUpperDiskpartYesExFATResult.txt" type "%temp%\FixerUpperDiskpartYesExFATResult.txt" del /f "%temp%\FixerUpperListDisk.txt" del /f "%temp%\FixerUpperDiskpartListDisk.txt" del /f "%temp%\FixerUpperFormatExFAT.txt" del /f "%temp%\FixerUpperDiskpartFormatExFAT.txt" del /f "%temp%\FixerUpperYesExFAT.txt" del /f "%temp%\FixerUpperDiskpartYesExFATResult.txt" echo. goto Skip_CLS_Partition_Manager :Assign_Drive_Letter REM assign letter=W goto Skip_CLS_Partition_Manager :Assign_Drive_Letter goto Skip_CLS_Partition_Manager :Convert_GPT_MBR goto Skip_CLS_Partition_Manager :Benchmark_HDD wmic logicaldisk list brief set /p UserInputPath=Select HDD Drive Letter: winsat disk -drive %UserInputPath% goto Skip_CLS_HDD_Options :Windows_Check_Disk cls :Skip_CLS_Windows_Check_Disk echo. call :colorEcho 0A " ----------" echo. echo Check Disk call :colorEcho 0A " ----------" echo. echo. call :colorEcho 0F "1 - Scan Only" echo. call :colorEcho 0F "2 - Scan and Fix (may need to run on startup, takes a while)" echo. call :colorEcho 0F "3 - Quick Scan" echo. echo. call :colorEcho 0F "4 - Cancel" echo. echo. set /P M=Use 123 keys to make your selection: echo. if %M%==1 goto Scan_Only if %M%==2 goto Scan_and_Fix if %M%==3 goto Quick_Scan if %M%==4 goto CLS_HDD_Options goto Windows_Check_Disk :Scan_Only wmic logicaldisk list brief set /p UserInputPath=Select HDD Drive Letter: chkdsk %UserInputPath%: goto Skip_CLS_Windows_Check_Disk :Scan_and_Fix wmic logicaldisk list brief set /p UserInputPath=Select HDD Drive Letter: chkdsk %UserInputPath%: /r goto Skip_CLS_Windows_Check_Disk :Quick_Scan wmic logicaldisk list brief set /p UserInputPath=Select HDD Drive Letter: chkdsk %UserInputPath%: /i /c goto Skip_CLS_Windows_Check_Disk REM ------------------------------------------------------------------------------------------------------------------------ :Bypass_CMD cls echo Working... ping -n 3 127.0.0.1>nul :CLS_Bypass_CMD cls call :colorEcho 0D "Useful for accessing Commands on systems that have CMD Prompt disabled" echo. :Skip_CLS_Bypass_CMD echo. call :colorEcho 0A " ----------" echo. echo Bypass CMD call :colorEcho 0A " ----------" echo. echo. call :colorEcho 0F "1 - Open Command Prompt" echo. call :colorEcho 0F "2 - Enter a Custom Command" echo. call :colorEcho 0F "3 - Enter Custom Commands (Recursive)" echo. echo. call :colorEcho 0F "4 - Cancel" echo. echo. set /P M=Use 123 keys to make your selection: echo. if %M%==1 goto Open_CMD if %M%==2 goto Custom_CMD if %M%==3 goto Recursive_CMD if %M%==4 goto END goto CLS_Bypass_CMD :Open_CMD start cmd.exe cd /d %~dp0 goto Skip_CLS_Bypass_CMD :Custom_CMD set /p UserInputPath=Enter your Command: call :colorEcho 0A "----------------------------------------------------------------------------" echo. echo. %UserInputPath% echo. call :colorEcho 0A "----------------------------------------------------------------------------" echo. goto Skip_CLS_Bypass_CMD :Recursive_CMD cls :Skip_CLS_Recursive_CMD set /p UserInputPath=Enter your Command: call :colorEcho 0A "----------------------------------------------------------------------------" echo. echo. %UserInputPath% echo. call :colorEcho 0A "----------------------------------------------------------------------------" echo. echo. goto Skip_CLS_Recursive_CMD REM ------------------------------------------------------------------------------------------------------------------------ EDIT REM :Edit REM cls REM echo ------------------------------------------------------------------------------ REM echo when you are finished editing, close notepad and the script will re-run itself REM echo ------------------------------------------------------------------------------ REM %~f0 REM cd /d %~dp0 REM start %~f0 REM exit REM ------------------------------------------------------------------------------------------------------------------------ :Repair_Windows_Files cls echo Working... ping -n 3 127.0.0.1>nul :CLS_Repair_Windows_Files cls call :colorEcho 0A " --------------------" echo. echo Repair Windows Files call :colorEcho 0A " --------------------" echo. echo. call :colorEcho 0F "1 - Windows System File Checker" echo. echo. call :colorEcho 0F "2 - Cancel" echo. echo. set /P M=Use 123 keys to make your selection: echo. if %M%==1 goto Windows_System_File_Checker if %M%==2 goto END goto CLS_Repair_Windows_Files :Windows_System_File_Checker cls :Skip_CLS_Windows_System_File_Checker echo. call :colorEcho 0A " -------------------" echo. echo System File Checker call :colorEcho 0A " -------------------" echo. echo. call :colorEcho 0F "1 - Verify Only" echo. call :colorEcho 0F "2 - Verify and Fix" echo. echo. call :colorEcho 0F "3 - Cancel" echo. echo. set /P M=Use 123 keys to make your selection: echo. if %M%==1 goto Verify_Only if %M%==2 goto Verify_and_Fix if %M%==3 goto CLS_Repair_Windows_Files goto Windows_System_File_Checker :Verify_Only sfc/verifyonly goto Skip_CLS_Windows_System_File_Checker :Verify_and_Fix sfc/scannow goto Skip_CLS_Windows_System_File_Checker REM ------------------------------------------------------------------------------------------------------------------------ :Defrag cls echo Working... ping -n 3 127.0.0.1>nul :CLS_Defrag cls :Skip_CLS_Defrag echo. call :colorEcho 0A " ------" echo. echo Defrag call :colorEcho 0A " ------" echo. echo. call :colorEcho 0F "1 - Defrag" echo. call :colorEcho 0F "2 - Consolidate Free Space (moves files to the start, free space in one chunk)" echo. echo. call :colorEcho 0F "3 - Cancel" echo. echo. set /P M=Use 123 keys to make your selection: echo. if %M%==1 goto Start_Defrag if %M%==2 goto Start_Consolidate if %M%==3 goto END goto CLS_Defrag :Start_Defrag echo. wmic logicaldisk list brief set /p UserInputPath=Select HDD Drive Letter: defrag %UserInputPath%: /h /u /v goto Skip_CLS_Defrag :Start_Consolidate echo. wmic logicaldisk list brief set /p UserInputPath=Select HDD Drive Letter: defrag %UserInputPath%: /x /u /v goto Skip_CLS_Defrag REM ------------------------------------------------------------------------------------------------------------------------ :Energy_Report cls echo Working... ping -n 3 127.0.0.1>nul cls call :colorEcho 0A " ----------------------" echo. echo Perform Energy Report? call :colorEcho 0A " ----------------------" echo. echo. call :colorEcho 0F "1 - Yes" echo. echo. call :colorEcho 0F "2 - No" echo. echo. set /P M=Use 123 keys to make your selection: echo. if %M%==1 goto Start_Energy_Report if %M%==2 goto END goto Energy_Report :Start_Energy_Report cls powercfg /energy /output "%temp%\FixerUpper_Energy_Report.html" /duration 60 start %temp%/FixerUpper_Energy_Report.html goto END REM ------------------------------------------------------------------------------------------------------------------------ :All_CMD_Commands cls echo Working... ping -n 3 127.0.0.1>nul cls help echo. set /p UserInputPath=Select a command for additional help: %UserInputPath% /? goto END REM ------------------------------------------------------------------------------------------------------------------------ :Hide_Unhide_Files cls echo Working... ping -n 3 127.0.0.1>nul :CLS_Hide_Unhide_Files cls call :colorEcho 0D "Don't forget the location, you may not be able to find it if you forget" echo. :Skip_CLS_Hide_Unhide_Files echo. call :colorEcho 0A "--------------------------------------------------------------------------------" echo. echo files hidden will not be shown even if "Show Hidden Files and Folders" echo is enabled under "Tools", "Folder Options", "View" call :colorEcho 0A "--------------------------------------------------------------------------------" echo. echo. call :colorEcho 0F "1 - Hide" echo. call :colorEcho 0F "2 - Unhide" echo. echo. call :colorEcho 0F "3 - Hide all files in a Folder (and the target folder)" echo. call :colorEcho 0F "4 - Unhide all files in a Folder (and the target folder)" echo. echo. call :colorEcho 0F "5 - Find Hidden Files" echo. call :colorEcho 0F "6 - Find Hidden Files by Extension (.txt .exe ...)" echo. echo. call :colorEcho 0F "7 - Cancel" echo. echo. set /P M=Use 123 keys to make your selection: echo. if %M%==1 goto Hide if %M%==2 goto Unhide if %M%==3 goto Hide_Folder if %M%==4 goto Unhide_Folder if %M%==5 goto Find_Hidden if %M%==6 goto Find_Extension if %M%==7 goto END goto CLS_Hide_Unhide_Files :Hide echo. echo ----Don't forget to add the file extension format C:\test.txt---- echo. set /p UserInputPath=Type the location of the file that you would like hidden: attrib +s +h "%UserInputPath%" goto Skip_CLS_Hide_Unhide_Files :Unhide echo. echo ----Don't forget to add the file extension format C:\test.txt---- echo. set /p UserInputPath=Type the location of the file that you would like unhidden: attrib -s -h "%UserInputPath%" goto Skip_CLS_Hide_Unhide_Files :Hide_Folder echo The target folder will also be hidden echo This may take a while depending on the amount of files echo. set /p UserInputPath=Type the location of the folder that you would like hidden: attrib +s +h /s /d "%UserInputPath%\*.*" attrib +s +h "%UserInputPath%" goto Skip_CLS_Hide_Unhide_Files :Unhide_Folder echo The target folder will also be unhidden echo This may take a while depending on the amount of files echo. set /p UserInputPath=Type the location of the folder that you would like unhidden: attrib -s -h /s /d "%UserInputPath%\*.*" attrib -s -h "%UserInputPath%" goto Skip_CLS_Hide_Unhide_Files :Find_Hidden call :colorEcho 0A "Search the Root of a drive as a broad search" echo. echo. set /p UserInputPath=Enter a directory in which you would like to find hidden files: call :colorEcho 0C "-------------------------------------------------------------------------" echo. echo Please Wait. Now searching for hidden files under %userinputpath% call :colorEcho 0C "-------------------------------------------------------------------------" echo. dir %UserInputPath% /A:H /B /S > "%temp%FixerUpperFindHidden.txt" "%temp%FixerUpperFindHidden.txt" del /f "%temp%FixerUpperFindHidden.txt" goto Skip_CLS_Hide_Unhide_Files :Find_Extension set /p UserInputPath=Select a HDD letter: set /p UserInputPath1=Type the file extension you would like to search for: call :colorEcho 0C "-------------------------------------------------------------------------" echo. echo Please Wait. Now searching for hidden "%userinputpath1%" extension files under "%userinputpath%" call :colorEcho 0C "-------------------------------------------------------------------------" echo. %UserInputPath% dir /s /b /a:h /o:e *%UserInputPath1% > "%temp%\FixerUpperFindByExtension.txt" "%temp%\FixerUpperFindByExtension.txt" del /f "%temp%\FixerUpperFindByExtension.txt" goto Skip_CLS_Hide_Unhide_Files REM ------------------------------------------------------------------------------------------------------------------------ :Network_and_WiFi cls echo Working... ping -n 3 127.0.0.1>nul :CLS_Network_and_WiFi cls call :colorEcho 0A " ----------------" echo. echo Network and WiFi call :colorEcho 0A " ----------------" echo. echo. call :colorEcho 0F "1 - Display WiFi Options" echo. echo. call :colorEcho 0F "2 - Display LAN Options" echo. echo. call :colorEcho 0F "3 - Cancel" echo. echo. set /P M=Use 123 keys to make your selection: echo. if %M%==1 goto Display_WiFi if %M%==2 goto Display_LAN if %M%==3 goto END goto CLS_Network_and_WiFi REM netsh wlan set profileparameter :Display_WiFi :CLS_Display_WiFi cls :Skip_CLS_Display_WiFi echo. call :colorEcho 0A " --------------" echo. echo WiFi Options call :colorEcho 0A " --------------" echo. echo. call :colorEcho 0F "1 - Display WiFi Password" echo. call :colorEcho 0F "2 - Delete a WiFi Profile" echo. call :colorEcho 0F "3 - Connect to a WiFi Network" echo. call :colorEcho 0F "4 - Display all WiFi Data" echo. echo. call :colorEcho 0F "5 - Create a Hotspot (Share Internet)" echo. echo. call :colorEcho 0F "6 - Cancel" echo. echo. set /P M=Use 123 keys to make your selection: echo. if %M%==1 goto WiFi_Password if %M%==2 goto Delete_WiFi if %M%==3 goto Connect_WiFi if %M%==4 goto Display_All_Wifi if %M%==5 goto Create_WiFi_Hotspot if %M%==6 goto CLS_Network_and_WiFi goto Display_WiFi :WiFi_Password netsh wlan show profile set /p UserInputPath=Enter the Profile name of the network: echo. netsh wlan show profile name="%UserInputPath%" key=clear | findstr "Key Content" goto Skip_CLS_Display_WiFi :Delete_WiFi netsh wlan show profile set /p UserInputPath=Enter the Profile name for the profile you would like to DELETE: netsh wlan delete profile name="%UserInputPath%" netsh wlan show profile goto Skip_CLS_Display_WiFi :Connect_Wifi netsh wlan show networks mode=bssid set /p UserInputPath=Enter the name of the network (SSID) you would like to CONNECT to: netsh wlan connect name="%UserInputPath%" goto Skip_CLS_Display_WiFi :Display_All_WiFi cls netsh wlan show all goto Skip_CLS_Display_WiFi :Create_WiFi_Hotspot cls :Skip_CLS_Create_WiFi_Hotspot echo. call :colorEcho 0A " -----------------" echo. echo Hotspot Options call :colorEcho 0A " -----------------" echo. echo. call :colorEcho 0F "1 - Create New Hotspot Profile" echo. echo. call :colorEcho 0F "2 - Start Hosting" echo. call :colorEcho 0F "3 - Stop Hosting" echo. echo. call :colorEcho 0F "4 - Hotspot Details (view people connected to the hotspot)" echo. echo. call :colorEcho 0F "5 - Allow (allows the virtual Hotspot adapter to run)" echo. call :colorEcho 0F "6 - Disallow" echo. echo. call :colorEcho 0F "7 - Cancel" echo. echo. set /P M=Use 123 keys to make your selection: echo. if %M%==1 goto Create_Hotspot if %M%==2 goto Start_Hotspot if %M%==3 goto Stop_Hotspot if %M%==4 goto Hotspot_Details if %M%==5 goto Allow_Hotspot if %M%==6 goto Disallow_Hotspot if %M%==7 goto CLS_Display_WiFi goto Create_WiFi_Hotspot :Create_Hotspot REM netsh wlan set hostednetwork mode=disallow set /p UserInputPath1=Enter the name of the network you would like to create: set /p UserInputPath2=Enter a password for the network: netsh wlan set hostednetwork ssid="%UserInputPath1%" key="%UserInputPath2%" goto Skip_CLS_Create_WiFi_Hotspot :Start_Hotspot netsh wlan start hostednetwork goto Skip_CLS_Create_WiFi_Hotspot :Stop_Hotspot netsh wlan stop hostednetwork goto Skip_CLS_Create_WiFi_Hotspot :Hotspot_Details netsh wlan show hostednetwork goto Skip_CLS_Create_WiFi_Hotspot :Allow_Hotspot netsh wlan set hostednetwork mode=allow goto Skip_CLS_Create_WiFi_Hotspot :Disallow_Hotspot netsh wlan set hostednetwork mode=disallow goto Skip_CLS_Create_WiFi_Hotspot :Display_LAN cls :Skip_CLS_Display_LAN echo. call :colorEcho 0A " -------------" echo. echo LAN Options call :colorEcho 0A " -------------" echo. echo. call :colorEcho 0F "1 - Refresh Internet Connection" echo. echo. call :colorEcho 0F "2 - Show LAN Settings" echo. call :colorEcho 0F "3 - Show Public IP Address (External IPv6)" echo. echo. call :colorEcho 0F "4 - Set Static IP Address" echo. call :colorEcho 0F "5 - Reset Interface Settings (Erases All Static IP Settings)" echo. echo. call :colorEcho 0F "6 - Cancel" echo. echo. set /P M=Use 123 keys to make your selection: echo. if %M%==1 goto Refresh_Internet_Connection if %M%==2 goto Show_LAN_Settings if %M%==3 goto Show_Public_IP if %M%==4 goto Set_Static_IP if %M%==5 goto Auto_Obtain_IPv4 if %M%==6 goto CLS_Network_and_WiFi goto Display_LAN :Refresh_Internet_Connection ipconfig /release ipconfig /renew ipconfig /registerdns goto Skip_CLS_Display_LAN :Show_LAN_Settings netsh lan show settings ipconfig goto Skip_CLS_Display_LAN :Show_Public_IP nslookup myip.opendns.com resolver1.opendns.com | findstr Address > %temp%\FixerUpperPublicIP find /v "208.67.222.222" %temp%\FixerUpperPublicIP > %temp%\FixerUpperPublicIPremoveOpenDNS type %temp%\FixerUpperPublicIPremoveOpenDNS del /f %temp%\FixerUpperPublicIP del /f %temp%\FixerUpperPublicIPremoveOpenDNS goto Skip_CLS_Display_LAN :Set_Static_IP netsh interface ip show config echo. ipconfig | findstr "Default Gateway" ipconfig | findstr "Subnet Mask" echo. echo example - Local Area Connection or Wi-Fi echo. set /p UserInputPath1=Enter the name of the network Interface: echo. call :colorEcho 0A "The selected network is %UserInputPath1%" echo. echo. echo use first 3 sets of numbers of your gateway, plus 3 numbers you want "2 - 254" echo example - 192.168.1.xxx echo. set /p UserInputPath2=Enter Custom Static IP: echo. call :colorEcho 0A "IPv4 set to %UserInputPath2%" echo. echo. echo Default Subnet Mask is always 255.255.255.0 echo. set /p UserInputPath3=Enter Your Subnet Mask: echo. call :colorEcho 0A "Subnet Mask set to %UserInputPath3%" echo. echo. echo Default Gateway Is Usually 192.168.1.1 echo. set /p UserInputPath4=Enter Your Gateway Address: echo. call :colorEcho 0A "The Gateway is %UserInputPath4%" echo. echo. echo Primary OpenDNS is 208.67.222.222 echo. set /p UserInputPath5=Enter Your Primary DNS Server: echo. call :colorEcho 0A "Primary DNS set to %UserInputPath5%" echo. echo. echo Secondary OpenDNS is 208.67.220.220 echo. set /p UserInputPath6=Enter Your Secondary DNS Server: echo. call :colorEcho 0A "Secondary DNS set to %UserInputPath6%" echo. echo. echo Static IP Set netsh interface ipv4 set address name=%UserInputPath1% static %UserInputPath2% mask=%UserInputPath3% echo Subnet Mask Set netsh interface ipv4 set address name=%UserInputPath1% static %UserInputPath2% gateway=%UserInputPath4% echo Gateway Set echo. netsh interface ipv4 add dnsservers name=%UserInputPath1% addr=%UserInputPath5% index=1 >nul echo Primary DNS Set echo. netsh interface ipv4 add dnsservers name=%UserInputPath1% addr=%UserInputPath6% index=2 >nul echo Secondary DNS Set ping -n 3 127.0.0.1>nul netsh interface ip show config call :colorEcho 0D "Network - %UserInputPath1%" echo. call :colorEcho 0A "IPv4 - %UserInputPath2%" echo. call :colorEcho 0A "Subnet Mask - %UserInputPath3%" echo. call :colorEcho 0A "Gateway - %UserInputPath4%" echo. call :colorEcho 0A "Primary DNS - %UserInputPath5%" echo. call :colorEcho 0A "Secondary DNS - %UserInputPath6%" echo. goto Skip_CLS_Display_LAN :Auto_Obtain_IPv4 netsh interface ip show config set /p UserInputPath=Enter the name of the network Interface: netsh interface ipv4 set address name=%UserInputPath% source=dhcp echo Reset IP to default netsh interface ipv4 set dnsservers name=%UserInputPath% source=dhcp echo Reset DNS to default goto Skip_CLS_Display_LAN REM netsh wlan dump > InterfaceList.txt and netsh exec InterfaceList.txt REM ------------------------------------------------------------------------------------------------------------------------ :User_Account cls echo Working... ping -n 3 127.0.0.1>nul :CLS_User_Account cls :Skip_CLS_User_Account echo. call :colorEcho 0A " -------------" echo. echo User Accounts call :colorEcho 0A " -------------" echo. echo. call :colorEcho 0F "1 - View All User Accounts" echo. call :colorEcho 0F "2 - Detail a User Account" echo. echo. call :colorEcho 0F "3 - Create New User" echo. call :colorEcho 0F "4 - Delete a User" echo. echo. call :colorEcho 0F "5 - Promote User to "Administrator" localgroup" echo. call :colorEcho 0F "6 - Demote User to "User" localgroup" echo. echo. call :colorEcho 0F "7 - Change User Password" echo. echo. call :colorEcho 0F "8 - Activate a User (able to use as a Windows login account)" echo. call :colorEcho 0F "9 - Deactivate a User" echo. echo. call :colorEcho 0F "10 - Cancel" echo. echo. set /P M=Use 123 keys to make your selection: echo. if %M%==1 goto View_All_Users if %M%==2 goto Detail_User if %M%==3 goto Create_User if %M%==4 goto Delete_User if %M%==5 goto Promote_User if %M%==6 goto Demote_User if %M%==7 goto Change_User_Password if %M%==8 goto Activate_User if %M%==9 goto Deactivate_User if %M%==10 goto END goto CLS_User_Account :View_All_Users net user goto Skip_CLS_User_Account :Detail_User net user set /p UserInputPath=Enter the User you would like to VIEW: net user %UserInputPath% goto Skip_CLS_User_Account :Create_User set /p UserInputPath=Enter the User you would like to CREATE: net user %UserInputPath% /add net user %UserInputPath% * net user net user %UserInputPath% goto Skip_CLS_User_Account :Delete_User net user set /p UserInputPath=Enter the User you would like to DELETE: net user %UserInputPath% /del net user goto Skip_CLS_User_Account :Promote_User net user set /p UserInputPath=Enter the User you would like to PROMOTE TO ADMIN ACCOUNT: net localgroup administrators %UserInputPath% /add goto Skip_CLS_User_Account :Demote_User net user set /p UserInputPath=Enter the User you would like to DEMOTE TO USER ACCOUNT: net localgroup users %UserInputPath% /add goto Skip_CLS_User_Account :Change_User_Password net user set /p UserInputPath=Enter the User you would like to CHANGE THE PASSWORD: net user %UserInputPath% * goto Skip_CLS_User_Account :Activate_User net user set /p UserInputPath=Enter the User you would like to ACTIVATE: net user %UserInputPath% /active:yes goto Skip_CLS_User_Account :Deactivate_User net user set /p UserInputPath=Enter the User you would like to DEACTIVATE: net user %UserInputPath% /active:no goto Skip_CLS_User_Account REM ------------------------------------------------------------------------------------------------------------------------ :Firewall_Options cls echo Working... ping -n 3 127.0.0.1>nul :CLS_Firewall_Options cls :Skip_CLS_Firewall_Options echo. call :colorEcho 0A " ----------------" echo. echo Firewall Options call :colorEcho 0A " ----------------" echo. echo. call :colorEcho 0F "1 - Reset Firewall to Default" echo. echo. call :colorEcho 0F "2 - Block a Program - NOT SETUP" echo. call :colorEcho 0F "3 - Allow a Program - NOT SETUP" echo. echo. call :colorEcho 0F "4 - Cancel" echo. echo. set /P M=Use 123 keys to make your selection: echo. if %M%==1 goto Reset_Firewall if %M%==2 goto Block_Program if %M%==3 goto Allow_Program if %M%==4 goto END goto CLS_Firewall_Options :Reset_Firewall cls call :MessageBox "This will revert the Firewall to its default settings" "FixerUpper" call :YesNoBox "Are you sure you would like to reset the Firewall?" "FixerUpper" if "%YesNo%"=="6" ( goto Yes_Reset_Firewall exit /b ) if "%YesNo%"=="7" ( call :MessageBox "Operation Cancelled" "FixerUpper" goto CLS_Firewall_Options exit /b ) :Yes_Reset_Firewall netsh advfirewall reset goto Skip_CLS_Firewall_Options :Block_Program goto Skip_CLS_Firewall_Options :Allow_Program goto Skip_CLS_Firewall_Options REM ------------------------------------------------------------------------------------------------------------------------ :Block_Website cls echo Working... ping -n 3 127.0.0.1>nul :CLS_Block_Website cls :Skip_CLS_Block_Website echo. call :colorEcho 0A " -------------" echo. echo Block Website call :colorEcho 0A " -------------" echo. echo. call :colorEcho 0F "1 - Open Hosts.file" echo. call :colorEcho 0F "2 - Block a Website" echo. echo. call :colorEcho 0F "3 - Cancel" echo. echo. set /P M=Use 123 keys to make your selection: echo. if %M%==1 goto Open_Hosts if %M%==2 goto Block_Site if %M%==3 goto END goto CLS_Block_Website :Open_Hosts start notepad.exe %WINDIR%\System32\Drivers\Etc\Hosts goto Skip_CLS_Block_Website :Block_Site call :colorEcho 0A "----------------------------------------------------------------------" echo. echo Blocked websites can be found in C:\Windows\System32\Drivers\Etc\Hosts call :colorEcho 0A "----------------------------------------------------------------------" echo. echo. set /p UserInputPath=Enter the website you would like to block: echo 0.0.0.0 %UserInputPath% >> %WINDIR%\System32\Drivers\Etc\Hosts goto Skip_CLS_Block_Website REM ------------------------------------------------------------------------------------------------------------------------ :Services cls echo Working... ping -n 3 127.0.0.1>nul :CLS_Services cls :Skip_CLS_Services echo. call :colorEcho 0A " --------" echo. echo Services call :colorEcho 0A " --------" echo. echo. call :colorEcho 0F "1 - View all Services" echo. call :colorEcho 0F "2 - View Services that are running" echo. call :colorEcho 0F "3 - View Driver Services" echo. call :colorEcho 0F "4 - View Service details" echo. echo. call :colorEcho 0F "5 - Start Service" echo. call :colorEcho 0F "6 - Stop Service" echo. echo. call :colorEcho 0F "7 - Set Service startup type (disabled, automatic)" echo. echo. call :colorEcho 0F "8 - Cancel" echo. echo. set /P M=Use 123 keys to make your selection: echo. if %M%==1 goto All_Services if %M%==2 goto Running_Services if %M%==3 goto Driver_Service if %M%==4 goto Service_Details if %M%==5 goto Start_Service if %M%==6 goto Stop_Service if %M%==7 goto Service_Startup_Type if %M%==8 goto END goto CLS_Services :All_Services call :colorEcho 0A "------------------------------------------------------------------------------------" echo. echo. sc query state= all echo. call :colorEcho 0A "------------------------------------------------------------------------------------" echo. goto Skip_CLS_Services :Running_Services call :colorEcho 0A "------------------------------------------------------------------------------------" echo. echo. sc query echo. call :colorEcho 0A "------------------------------------------------------------------------------------" echo. goto Skip_CLS_Services :Driver_Service call :colorEcho 0A "------------------------------------------------------------------------------------" echo. echo. sc query type= driver group= NDIS echo. call :colorEcho 0A "------------------------------------------------------------------------------------" echo. goto Skip_CLS_Services :Service_Details set /p UserInputPath=Enter the Service name you would like to detail: call :colorEcho 0A "------------------------------------------------------------------------------------" echo. echo. sc qdescription %UserInputPath% echo. call :colorEcho 0A "------------------------------------------------------------------------------------" echo. echo. sc qc %UserInputPath% echo. call :colorEcho 0A "------------------------------------------------------------------------------------" echo. echo. sc enumdepend %UserInputPath% 2048 echo. call :colorEcho 0A "------------------------------------------------------------------------------------" echo. goto Skip_CLS_Services :Start_Service set /p UserInputPath=Enter the Service name you would like to start: net start %UserInputPath% goto Skip_CLS_Services :Stop_Service set /p UserInputPath=Enter the Service name you would like to stop: net stop %UserInputPath% goto Skip_CLS_Services :Service_Startup_Type echo. call :colorEcho 0A " --------------------" echo. echo Service Startup Type call :colorEcho 0A " --------------------" echo. echo. call :colorEcho 0F "1 - Set Service to Automatic Startup" echo. call :colorEcho 0F "2 - Set Service to Delayed Automatic Startup" echo. call :colorEcho 0F "3 - Set Service to Manual" echo. call :colorEcho 0F "4 - Disable Service" echo. echo. call :colorEcho 0F "5 - Cancel" echo. echo. set /P M=Use 123 keys to make your selection: echo. if %M%==1 goto Service_Automatic if %M%==2 goto Service_Delay_Automatic if %M%==3 goto Service_Manual if %M%==4 goto Disable_Service if %M%==5 goto CLS_Services goto Service_Startup_Type :Service_Automatic set /p UserInputPath=Enter the Service name you would like to set automatic on: sc config %UserInputPath% start= auto goto Service_Startup_Type :Service_Delay_Automatic set /p UserInputPath=Enter the Service name you would like to set delayed-auto on: sc config %UserInputPath% start= delayed-auto goto Service_Startup_Type :Service_Manual set /p UserInputPath=Enter the Service name you would like to set manual on: sc config %UserInputPath% start= demand goto Service_Startup_Type :Disable_Service set /p UserInputPath=Enter the Service name you would like to disable: sc config %UserInputPath% start= disabled goto Service_Startup_Type REM ------------------------------------------------------------------------------------------------------------------------ :16 echo this is just a test and will not actually format anything echo. call :MessageBox "Formatting will erase all data" "WARNING" call :YesNoBox "Are you sure you would like to format to NTFS?" "Format a Drive" if "%YesNo%"=="6" ( goto Answer_Yes exit /b ) if "%YesNo%"=="7" ( call :MessageBox "Format Aborted" "Operation Cancelled" echo Operation Cancelled, Format Aborted by User goto END exit /b ) echo. goto END REM ------------------------------------------------------------------------------------------------------------------------ :17 cls echo Working... ping -n 3 127.0.0.1>nul cls echo.>"%temp%\FixerUpperTest.vbs" echo x=msgbox("You've been a bad girl, haven't you?", 4+16, "Hey Sexy") > "%temp%\FixerUpperTest.vbs" "%temp%\FixerUpperTest.vbs" echo. goto END REM ------------------------------------------------------------------------------------------------------------------------ :18 cls echo Working... ping -n 3 127.0.0.1>nul cls call :MessageBox "Windows has encountered a serious error and will now be deleted.", "System Error" goto END REM ------------------------------------------------------------------------------------------------------------------------ :Terms_of_Service cls echo Terms of Service echo. echo. echo 1. By the use of FixerUpper.exe, you agree and acknowledge that this echo program is potentially unsafe. echo. echo 2. The author of FixerUpper.exe shall not be held accountable for neither the echo Use or Misuse of this program, nor Lost Data or Irreversible Damage echo that this program may incur. echo. echo 3. FixerUpper.exe comes malware, spyware, and virus-free. This program is echo freely distributable as long as it is distributed as-is. echo. echo 4. FixerUpper.exe is freeware, and by no means shall this program be sold echo or marketed. echo. pause goto END REM ------------------------------------------------------------------------------------------------------------------------ :Misc cls echo Working... ping -n 3 127.0.0.1>nul :CLS_Misc cls echo. call :colorEcho 0A " -------------" echo. echo Miscellaneous call :colorEcho 0A " -------------" echo. echo. call :colorEcho 0F "1 - Replace strings of text with a new string of text inside a file" echo. echo. call :colorEcho 0F "2 - Add God Mode to Desktop" echo. echo. call :colorEcho 0F "3 - Add Take Ownership to context menu (rightclick menu)" echo. echo. call :colorEcho 0F "4 - Replace a folder's physical location (with a symbolic link)" echo. echo. call :colorEcho 0F "5 - View Windows version information" echo. echo. call :colorEcho 0F "6 - Driver Signature Enforcement" echo. echo. call :colorEcho 0F "7 - Restart Computer and Display Advanced Boot Menu" echo. echo. echo. call :colorEcho 0F "8 - Cancel" echo. echo. set /P M=Use 123 keys to make your selection: echo. if %M%==1 goto Replace_With_New_String if %M%==2 goto Add_God_Mode_to_Desktop if %M%==3 goto Take_Ownership if %M%==4 goto Symbolic_Link if %M%==5 goto Winver if %M%==6 goto Driver_Signature_Enforcement if %M%==7 goto Advanced_Boot_Restart if %M%==8 goto END goto CLS_Misc :Replace_With_New_String cls setlocal enabledelayedexpansion echo be paitent, this may take a while echo compatible with almost any file format (ex: .txt .html .file) echo. echo. echo ----Don't forget to add the file extension format C:\test.txt---- echo. echo. set /p UserInputPath1=Enter the location of the file: echo. echo. echo ----Don't forget to add the file extension format C:\test.txt---- echo Be sure to use a different file name echo. echo. set /p UserInputPath2=Enter a location you would like to save the new file to: echo. echo. set /p UserInputPath3=Enter the string of text you would like to change: echo. set /p UserInputPath4=Enter the string of text you would like replace "%UserInputPath3%" with: echo. set filein="%UserInputPath1%" set fileout="%UserInputPath2%" set old=%UserInputPath3% set new=%UserInputPath4% for /f "tokens=* delims=¶" %%i in ( '"type %filein%"') do ( set str=%%i set str=!str:%old%=%new%! echo !str! >> %fileout% ) goto CLS_Misc :Add_God_Mode_to_Desktop mkdir "%homedrive%\Users\%username%\desktop\God Mode .{ED7BA470-8E54-465E-825C-99712043E01C}" cls echo God Mode added to %homedrive%\Users\%username%\desktop echo. ping -n 3 127.0.0.1>nul goto CLS_Misc :Take_Ownership cls call :colorEcho 0D "Useful if you do not have permissions to access a file" echo. echo. call :colorEcho 0F "1 - Add Take Ownership" echo. echo. call :colorEcho 0F "2 - Remove Take Ownership" echo. echo. echo. call :colorEcho 0F "3 - Cancel" echo. echo. set /P M=Use 123 keys to make your selection: echo. if %M%==1 goto Add_TakeOwnership if %M%==2 goto Remove_TakeOwnership if %M%==3 goto CLS_Misc goto Take_Ownership :Add_TakeOwnership echo.>"%temp%\FixerUpperAddTakeOwnership.reg" echo Windows Registry Editor Version 5.00 > "%temp%\FixerUpperAddTakeOwnership.reg" echo.>> "%temp%\FixerUpperAddTakeOwnership.reg" echo [HKEY_CLASSES_ROOT\*\shell\runas] >> "%temp%\FixerUpperAddTakeOwnership.reg" echo @="Take Ownership" >> "%temp%\FixerUpperAddTakeOwnership.reg" echo "NoWorkingDirectory"="" >> "%temp%\FixerUpperAddTakeOwnership.reg" echo.>> "%temp%\FixerUpperAddTakeOwnership.reg" echo [HKEY_CLASSES_ROOT\*\shell\runas\command] >> "%temp%\FixerUpperAddTakeOwnership.reg" echo @="cmd.exe /c takeown /f \"%%1\" && icacls \"%%1\" /grant administrators:F" >> "%temp%\FixerUpperAddTakeOwnership.reg" echo "IsolatedCommand"="cmd.exe /c takeown /f \"%%1\" && icacls \"%%1\" /grant administrators:F" >> "%temp%\FixerUpperAddTakeOwnership.reg" echo.>> "%temp%\FixerUpperAddTakeOwnership.reg" echo [HKEY_CLASSES_ROOT\Directory\shell\runas] >> "%temp%\FixerUpperAddTakeOwnership.reg" echo @="Take Ownership" >> "%temp%\FixerUpperAddTakeOwnership.reg" echo "NoWorkingDirectory"="" >> "%temp%\FixerUpperAddTakeOwnership.reg" echo.>> "%temp%\FixerUpperAddTakeOwnership.reg" echo [HKEY_CLASSES_ROOT\Directory\shell\runas\command] >> "%temp%\FixerUpperAddTakeOwnership.reg" echo @="cmd.exe /c takeown /f \"%%1\" /r /d y && icacls \"%%1\" /grant administrators:F /t" >> "%temp%\FixerUpperAddTakeOwnership.reg" echo "IsolatedCommand"="cmd.exe /c takeown /f \"%%1\" /r /d y && icacls \"%%1\" /grant administrators:F /t" >> "%temp%\FixerUpperAddTakeOwnership.reg" "%temp%\FixerUpperAddTakeOwnership.reg" del /f "%temp%\FixerUpperAddTakeOwnership.reg" goto CLS_Misc :Remove_TakeOwnership echo.>"%temp%\FixerUpperRemoveTakeOwnership.reg" echo Windows Registry Editor Version 5.00 > "%temp%\FixerUpperRemoveTakeOwnership.reg" echo.>> "%temp%\FixerUpperRemoveTakeOwnership.reg" echo.>> "%temp%\FixerUpperRemoveTakeOwnership.reg" echo [-HKEY_CLASSES_ROOT\*\shell\runas] >> "%temp%\FixerUpperRemoveTakeOwnership.reg" echo.>> "%temp%\FixerUpperRemoveTakeOwnership.reg" echo [-HKEY_CLASSES_ROOT\Directory\shell\runas] >> "%temp%\FixerUpperRemoveTakeOwnership.reg" "%temp%\FixerUpperRemoveTakeOwnership.reg" del /f "%temp%\FixerUpperRemoveTakeOwnership.reg" goto CLS_Misc :Symbolic_Link cls call :colorEcho 0D "Useful for programs that won't allow you to change save locations" echo. echo. call :colorEcho 0F "- Notice -" echo. call :colorEcho 0C "When you move files or folders to FAT volumes, the folders and files lose" echo. call :colorEcho 0C "their NTFS permissions because FAT volumes do not support NTFS permissions" echo. echo. set /p UserInputPath1=Enter the location of the source folder: echo. set /p UserInputPath2=Enter the location of the destination: echo. echo. move "%UserInputPath1%" "%UserInputPath2%">nul mklink /d "%UserInputPath1%" "%UserInputPath2%">nul echo moved physical location to %UserInputPath2% echo. echo a symbolic link has been added at %UserInputPath1% echo. echo. pause goto CLS_Misc :Winver cls echo System Name: hostname echo. echo Username: echo %username% echo. systeminfo openfiles dxdiag winver echo. pause goto CLS_Misc :Driver_Signature_Enforcement cls call :colorEcho 0D "By default, drivers with an unknown driver publisher are blocked by" echo. call :colorEcho 0D "the system as a security measure. This can be a nuisance to users with" echo. call :colorEcho 0D "3rd party hardware; such as game controllers" echo. echo. call :colorEcho 0C "Requires a reboot to take effect" echo. echo. call :colorEcho 0A " ----------------------------" echo. echo Driver Signature Enforcement call :colorEcho 0A " ----------------------------" echo. echo. call :colorEcho 0F "1 - Enable Driver Signature Enforcement (default)" echo. echo. call :colorEcho 0F "2 - Disable Driver Signature Enforcement" echo. echo. echo. call :colorEcho 0F "3 - Cancel" echo. echo. set /P M=Use 123 keys to make your selection: echo. if %M%==1 goto Enable_Enforcement if %M%==2 goto Disable_Enforcement if %M%==3 goto CLS_Misc goto Driver_Signature_Enforcement :Enable_Enforcement cls bcdedit /set testsigning on echo. echo Driver Signature Enforcement ENABLED echo. call :YesNoBox "Reboot System?" "Requires a reboot to take effect" if "%YesNo%"=="6" ( shutdown /r /t 0 exit /b ) if "%YesNo%"=="7" ( goto CLS_Misc exit /b ) echo. goto CLS_Misc :Disable_Enforcement cls bcdedit /set testsigning off echo. echo Driver Signature Enforcement DISABLED echo. call :YesNoBox "Reboot System?" "Requires a reboot to take effect" if "%YesNo%"=="6" ( shutdown /r /t 0 exit /b ) if "%YesNo%"=="7" ( goto CLS_Misc exit /b ) echo. goto CLS_Misc :Advanced_Boot_Restart cls echo. call :YesNoBox "Reboot System?" "Requires a reboot to take effect" if "%YesNo%"=="6" ( shutdown /r /o /t 0 exit /b ) if "%YesNo%"=="7" ( goto CLS_Misc exit /b ) echo. goto CLS_Misc REM ------------------------------------------------------------------------------------------------------------------------ call :MessageBox "Formatting will erase all data" "WARNING" call :YesNoBox "Are you sure you would like to format to NTFS?" "Format a Drive" if "%YesNo%"=="6" ( goto Answer_Yes exit /b ) if "%YesNo%"=="7" ( call :MessageBox "Format Aborted" "Operation Cancelled" echo Operation Cancelled, Format Aborted by User goto END exit /b ) :YesNoBox REM returns 6 = Yes, 7 = No. Type=4 = Yes/No set YesNo= set MsgType=4 set heading=%~2 set message=%~1 echo wscript.echo msgbox(WScript.Arguments(0),%MsgType%,WScript.Arguments(1)) >"%temp%\input.vbs" for /f "tokens=* delims=" %%a in ('cscript //nologo "%temp%\input.vbs" "%message%" "%heading%"') do set YesNo=%%a exit /b :MessageBox set heading=%~2 set message=%~1 echo msgbox WScript.Arguments(0),0,WScript.Arguments(1) >"%temp%\input.vbs" cscript //nologo "%temp%\input.vbs" "%message%" "%heading%" exit /b :Answer_Yes echo success goto END REM ------------------------------------------------------------------------------------------------------------------------ REM :HACK_WINPW_EASEACCESSCENTER REM HACK REM cd c:\windows\system32 REM ren utilman.exe utilmanORIGINAL.exe REM copy cmd.exe utilman.exe REM UNHACK REM cd c:\windows\system32 REM del /f ultiman.exe REM ren utilmanORIGINAL.exe utilman.exe REM ------------------------------------------------------------------------------------------------------------------------ :END echo. echo Command Finished. ping -n 3 127.0.0.1>nul echo. pause cls goto menu REM ------------------------------------------------------------------------------------------------------------------------ :colorEcho <nul set /p ".=%DEL%" > "%~2" findstr /v /a:%1 /R "^$" "%~2" nul del "%~2" > nul 2>&1i REM ------------------------------------------------------------------------------------------------------------------------ Link to comment Share on other sites More sharing options...
HankHell Posted January 25, 2018 Author Share Posted January 25, 2018 my apologies as some of the text can be misleading; such as refresh_browser cleans DNS cache..etc I haven't worked on it lately and haven't gotten around to renaming things. though every little bit of code has been tested and works without bugs. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted January 25, 2018 Moderators Share Posted January 25, 2018 @HankHell as this is an AutoIt forum, and AutoIt can natively do pretty much anything you would do with a batch file (plus an entire world that batch can't touch), why the burning need to share this? "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
HankHell Posted January 25, 2018 Author Share Posted January 25, 2018 (edited) 7 hours ago, JLogan3o13 said: @HankHell as this is an AutoIt forum, and AutoIt can natively do pretty much anything you would do with a batch file (plus an entire world that batch can't touch), why the burning need to share this? you still need the .bat code to implement it into .au3, I'm fully aware autoit can do more than .bat. as .bat is only for windows shell commands. it is a good example of what you can do with .bat within the windows shell. I looked all over trying to find good examples and couldn't find any. this is one of the best as it contains multiple things (over 2,000 lines of code). plus, this is inside the general developer section of the forums. I don't think I'm breaking any rules posting it. all I wanted to do was contribute to the forums a little since I don't have any decent .au3 scripts laying around Edited January 25, 2018 by HankHell Link to comment Share on other sites More sharing options...
HankHell Posted January 25, 2018 Author Share Posted January 25, 2018 (edited) 38 minutes ago, HankHell said: if you really hate .bat that much you can take the topic down, you're a mod. I've gotten a lot of hate over programming some things in .bat for some weird reason, even though .bat has worked 100% exactly for what I wanted to use it for. why would I need it to be in .au3 when it does what I want it to already? that's my question. seems like I'd just be adding a bunch of code that I wouldn't need that, like you said, will do the same thing. Edited January 25, 2018 by HankHell Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted January 25, 2018 Moderators Share Posted January 25, 2018 I am fully aware of my abilities as a Mod, thanks. I also have no intention of doing anything with your post - had not planned on paying it any more attention than I had already, and certainly no interest in taking it down; simply asked a question. I have seen no "hate"directed at you; seems like a personal issue with thin skin on your part. It does, however, beg the question of common sense - I don't go onto a JavaScript forum and tell them how great VBScript is. Why? Because someone is going to ask why I am posting that here. Not sure what kind of response you thought you'd get beyond . Draygoes 1 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
HankHell Posted January 25, 2018 Author Share Posted January 25, 2018 12 minutes ago, JLogan3o13 said: I am fully aware of my abilities as a Mod, thanks. I also have no intention of doing anything with your post - had not planned on paying it any more attention than I had already, and certainly no interest in taking it down; simply asked a question. I have seen no "hate"directed at you; seems like a personal issue with thin skin on your part. It does, however, beg the question of common sense - I don't go onto a JavaScript forum and tell them how great VBScript is. Why? Because someone is going to ask why I am posting that here. Not sure what kind of response you thought you'd get beyond . what you posted was extremely rude and unbecoming of a moderator. all I wanted to do was share something I made with the autoit community and you come along and take a giant shit on me. not cool man, not cool at all. it seems a lot of the people on here have their heads up their asses, asking for hacks and whatnot. At least Jos has some common respect for coders. .bat was the first thing I've ever learned to do, then javascript, then c#. I really enjoy the au3 language because it is much easier to understand, and to write simple functions. I just know way more .bat functions than anything else and I figured if someone needed help with .bat, they could come to me. Link to comment Share on other sites More sharing options...
Developers Jos Posted January 25, 2018 Developers Share Posted January 25, 2018 (edited) 3 minutes ago, HankHell said: what you posted was extremely rude and unbecoming of a moderator. Yea, he is known for his rudeness and would just ignore him if I were you. On the other side you could simply try to understand what he is telling you as you are simply not making too much sense, but guess now I am rude to you ....right? What the hell....fuck it. *click* Jos Edited January 25, 2018 by Jos JLogan3o13 1 SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Recommended Posts