Skip to content

Commit

Permalink
Merge pull request #152 from Stensel8/main
Browse files Browse the repository at this point in the history
Fix/Tweak: Trace Log Function
  • Loading branch information
REALSDEALS authored May 25, 2023
2 parents 0f997a8 + eb210ec commit 69c21f2
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 43 deletions.
9 changes: 9 additions & 0 deletions Documentation/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog.md - pcHealth

## 25-05-2023 - @REALSDEALS & @Stensel8

Created a issue, issue is about the following:
- The log file couldn't be openend after the log file was created due to a typo in the code. @Stensel8 fixed this issue.

Besides that the code has had some revisions, some quality of life changes have been made and it's made a little bit easier on how to use function 13 in the tools menu.

Thanks again for helping me out @Stensel8!

## 11-04-2023 - @REALSDEALS

Added a function so the user can designate his/her own url to trace/ping.
Expand Down
3 changes: 2 additions & 1 deletion Documentation/releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ For now only the version names will be displayed, in the future there might be e
# Current Version(s)

Full Release - v1.5.9 (Stable)
Beta Release - v1.6.6-beta
Beta Release - v1.6.7-beta
Alpha Release - v0.3.0-alpha (PowerShell)

## Older Releases
Expand All @@ -31,6 +31,7 @@ Here you can see a overview of the older version.

### Beta Release(s)

- Beta Release - v1.6.7-beta
- Beta Release - v1.6.6-beta
- Beta Release - v1.6.5-beta
- Beta Release - v1.6.4-beta
Expand Down
100 changes: 58 additions & 42 deletions Scripts/CMD/pcHealth.bat
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ if '%errorlevel%' NEQ '0' (
:gotAdmin
pushd "%CD%"
CD /D "%~dp0"
:--------------------------------------
:--------------------------------------
:: MainCode
@echo off
title pcHealth - Check your PC's Health! - version 1.6.6-beta
title pcHealth - Check your PC's Health! - version 1.6.7-beta
cd /
color D
cls
Expand All @@ -42,7 +42,7 @@ echo Thanks for downloading and using pcHealth!
echo Please be sure that you are running this Batch file in Administrator mode.
echo.
echo Made by REALSDEALS - Licensed under GNU-3 (You are free to use, but not to change or to remove this line.)
echo You are now using version 1.6.6-beta
echo You are now using version 1.6.7-beta
echo.
echo %DATE%, %TIME%
echo.
Expand All @@ -63,7 +63,7 @@ IF %A%==4 GOTO PRERELEASE
IF %A%==5 GOTO CLOSE

:TOOLS
cls
cls
color 09
echo.
echo You are now in the Tools menu:
Expand Down Expand Up @@ -111,7 +111,7 @@ IF %B%==11 GOTO CONTINUESPING
IF %B%==12 GOTO TRACEGOOGLE
IF %B%==13 GOTO TRACEDESIG
IF %B%==14 GOTO SYSUPDATE
IF %B%==15 GOTO AUDIORE
IF %B%==15 GOTO AUDIORE
IF %B%==16 GOTO BATOPEN
IF %B%==17 GOTO OPENCBSLOG
IF %B%==18 GOTO NINITE
Expand Down Expand Up @@ -186,8 +186,8 @@ IF %D%==4 GOTO CLOSE

:CPUANDGPUINFO
cls
color 0A
echo.
color 0A
echo.
echo Your CPU information:
echo.
wmic cpu get caption, deviceid, name, numberofcores, maxclockspeed, status
Expand Down Expand Up @@ -291,9 +291,9 @@ IF %L%==3 GOTO CLOSE
:DFR
cls
color 0A
dfrgui.exe
dfrgui.exe
pause
echo.
echo.
SET /P LK=Enter number 1 to return to the previous sub-menu, enter number 2 to return to the main-menu or enter number 3 to exit the script. Enter:
IF %L%==1 GOTO TOOLS
IF %L%==2 GOTO MENU
Expand All @@ -304,7 +304,7 @@ cls
color 0A
cleanmgr.exe
pause
echo.
echo.
SET /P LKT=Enter number 1 to return to the previous sub-menu, enter number 2 to return to the main-menu or enter number 3 to exit the script. Enter:
IF %L%==1 GOTO TOOLS
IF %L%==2 GOTO MENU
Expand All @@ -313,7 +313,7 @@ IF %L%==3 GOTO CLOSE
:SHORTPING
cls
color 0A
ping 8.8.8.8
ping 8.8.8.8
pause
echo.
SET /P M=Enter number 1 to return to the previous sub-menu, enter number 2 to return to the main-menu, enter number 3 to start a continues ping test or enter number 4 to exit the script. Enter:
Expand Down Expand Up @@ -350,7 +350,7 @@ IF %NM%==3 GOTO CLOSE
:TRACEDESIG
cls
color 0A
echo.
echo.
echo Please enter a URL to start a trace route: (example: www.google.com)
echo.
set /p ip=Tell me your target:
Expand All @@ -370,16 +370,32 @@ IF "%ip%" equ "" (
ping %IP% > "C:\ping-%ip%.txt"
)
pause
SET /P OPEN=Enter 1 to open the folder were the text files (logs) are being stored, enter 2 to return to the main menu or enter number 3 to close the script. Enter:
IF %XX%==1 start %windir%\explorer.exe "C:\"
IF %XX%==2 GOTO MENU
IF %XX%==3 GOTO CLOSE
SET /P OPEN=Enter 1 to open the C directory of your pc where the files are located, enter 2 to open the logs; 2 .txt files will open, enter 3 to return to the main menu or enter number 4 to close the script. Enter:
IF %OPEN%==1 (
start %windir%\explorer.exe "C:\"
pause
GOTO MENU
)
IF %OPEN%==2 GOTO EXECLOG
IF %OPEN%==3 GOTO MENU
IF %OPEN%==4 GOTO CLOSE

:EXECLOG
cls
color 0A
echo.
start %windir%\explorer.exe "C:\trace-%ip%.txt" & start %windir%\explorer.exe "C:\ping-%ip%.txt"
pause
echo.
SET /P OP=Enter number 1 to return to the previous sub-menu, enter number 2 to return to the main-menu or enter number 3 to exit the script. Enter:
IF %OP%==1 GOTO TOOLS
IF %OP%==2 GOTO MENU
IF %OP%==3 GOTO CLOSE

:AUDIORE
cls
color 0A
if "%1"=="am_admin" (powershell start -verb runas '%0' am_admin)
if "%1"=="am_admin" (powershell start -verb runas '%0' am_admin)
net stop audiosrv
net stop AudioEndPointBuilder
net start AudioEndPointBuilder
Expand Down Expand Up @@ -415,7 +431,7 @@ IF %P%==3 GOTO CLOSE
:NINITE
cls
color 0A
start "" https://ninite.com/7zip-chrome-edge-vlc/ninite.exe
start "" https://ninite.com/7zip-chrome-edge-vlc/ninite.exe
pause
echo.
SET /P Q=Enter number 1 to return to the previous sub-menu, enter number 2 to return to the main-menu or enter number 3 to exit the script. Enter:
Expand Down Expand Up @@ -447,22 +463,22 @@ color 0E
echo.
echo The BIOS Password Recovery tool is a website that can be used to gather/generate a recovery code for the BIOS.
echo.
echo If you don't know how to use this function/website, then
echo If you don't know how to use this function/website, then
echo I would suggest that you enter '2' on the next line to learn more.
echo.
echo.
echo The credits for this function and repository goes to the owner: @bacher09
echo.
SET /P SK=Enter number 1 to visit the website, enter number 2 to go to the repository of BIOS-PW and learn more! Enter number 3 to return to the sub-menu, enter number 4 to return to the main-menu or enter number 5 to close the script. Enter:
IF %SK%==1 start "" https://bios-pw.org && GOTO BIOSPW
IF %SK%==2 start "" https://github.com/bacher09/pwgen-for-bios && GOTO BIOSPW
IF %SK%==3 GOTO TOOLS
IF %SK%==4 GOTO MENU
IF %SK%==5 GOTO CLOSE
IF %SK%==5 GOTO CLOSE

:RESHUT
cls
color 0A
echo.
echo.
SET /P S=If you want to log off from your PC/Laptop enter number 1, to restart enter number 2, to shutdown enter number 3 and to return to the previous sub-menu enter number 4 or to exit the script... enter number 5. Enter:
IF %S%==1 GOTO LOGOFF1
IF %S%==2 GOTO RESTART2
Expand All @@ -472,18 +488,18 @@ IF %S%==5 GOTO CLOSE

:LOGOFF1
cls
color 0A
echo.
color 0A
echo.
SET /P T=Are you sure that you want to log off your PC? Enter number 1, enter number 2 to return to the previous sub-menu, enter number 3 to return to the main-menu or enter number 4 to exit the script. Enter:
IF %T%==1 GOTO LOGOFFCONFIRM1
IF %T%==2 GOTO TOOLS
IF %T%==3 GOTO MENU
IF %T%==3 GOTO MENU
IF %T%==4 GOTO CLOSE

:LOGOFFCONFIRM1
cls
color 0A
shutdown /l
color 0A
shutdown /l
EXIT /B

:RESTART2
Expand All @@ -498,17 +514,17 @@ IF %U%==4 GOTO CLOSE

:RESTARTCONFIRM2
cls
color 0A
color 0A
shutdown /r
EXIT /B

:SHUTDOWN3
cls
color 0A
echo.
echo.
SET /P V=Are you sure that you want to shutdown your PC? Enter number 1, to continue. Enter number 2 to return to the previous sub-menu, enter number 3 to return to the main-menu or enter number 4 to exit the script. Enter:
IF %V%==1 GOTO SHUTDOWNCONFIRM3
IF %V%==2 GOTO TOOLS
IF %V%==2 GOTO TOOLS
IF %V%==3 GOTO MENU
IF %V%==4 GOTO CLOSE

Expand All @@ -535,7 +551,7 @@ color 0A
echo.
echo Your download will start now!
echo.
start "" https://github.com/REALSDEALS/pcHealth/archive/refs/heads/main.zip
start "" https://github.com/REALSDEALS/pcHealth/archive/refs/heads/main.zip
echo.
SET /P AD=To return to the sub-menu enter 1, to return to the main menu enter 2 or to close the script enter 3. Enter:
IF %AD%==1 GOTO PROGRAMS
Expand All @@ -554,15 +570,15 @@ SET /P AP=To return to the sub-menu enter 1, to return to the main menu enter 2
IF %AP%==1 GOTO PROGRAMS
IF %AP%==2 GOTO MENU
IF %AP%==3 GOTO CLOSE

:HARDINFODOWN
cls
color 0A
echo.
echo Are you sure that you want to download the newest version of Hardware Info?
echo.
SET /P AE=If yes, enter the number 1, if not enter number 2 to return to the sub-menu. Enter:
IF %AE%==1 GOTO HARDINFODOWNLOADLINK
IF %AE%==1 GOTO HARDINFODOWNLOADLINK
IF %AE%==2 GOTO PROGRAMS

:HARDINFODOWNLOADLINK
Expand All @@ -583,15 +599,15 @@ cls
color 0A
echo.
echo Are you sure that you want to download the latest version of ADW Cleaner?
echo.
echo.
SET /P AG=If yes enter the number 1 to start the download, enter number 2 to return to the previous sub-menu. Enter:
IF %AG%==1 GOTO ADWCLEANERDOWNLOADLINK
IF %AG%==2 GOTO PROGRAMS

:ADWCLEANERDOWNLOADLINK
cls
color 0A
echo.
echo.
echo Your download will start now!
echo.
start "" https://downloads.malwarebytes.com/file/adwcleaner
Expand All @@ -604,9 +620,9 @@ IF %AH%==3 GOTO CLOSE
:DISKINFODOWN
cls
color 0A
echo.
echo.
echo Are you sure that you want to download the latest version of Disk Info?
echo.
echo.
SET /P AI=If yes enter the number 1 to start the download, enter the number 2 to return to the previous sub-menu. Enter:
IF %AI%==1 GOTO DISKINFODOWNLOADLINK
IF %AI%==2 GOTO PROGRAMS
Expand All @@ -626,9 +642,9 @@ IF %AJ%==3 GOTO CLOSE
:DISKMARKDOWN
cls
color 0A
echo.
echo.
echo Are you sure that you want to download the latest version of Disk Mark?
echo.
echo.
SET /P AK=If yes enter the number 1 to start the download, enter the number 2 to return to the previous sub-menu. Enter:
IF %AK%==1 GOTO DISKMARKDOWNLOADLINK
IF %AK%==2 GOTO PROGRAMS
Expand All @@ -648,9 +664,9 @@ IF %AL%==3 GOTO CLOSE
:PRIMEDOWN
cls
color 0A
echo.
echo.
echo Are you sure that you want to download the latest version of Prime95? Enter:
echo.
echo.
SET /P AM=If yes enter the number 1 to start the download, enter the number 2 to return to the previous sub-menu.
IF %AM%==1 GOTO PRIMEDOWNLOADLINK
IF %AM%==2 GOTO PROGRAMS
Expand All @@ -671,7 +687,7 @@ IF %AN%==3 GOTO CLOSE
cls
color 0A
echo.
echo Are you sure that you want to try out a pre-release?
echo Are you sure that you want to try out a pre-release?
echo.
echo
SET /P AO=If yes you could enter number 1 to be redirected to our version page on GitHub, we would like to recieve feedback on your experience with a pre-release build! Because it could help us out, improving our script! You can enter number 2 to return to the main menu or you could enter number 3 to close the script. Enter:
Expand Down

0 comments on commit 69c21f2

Please sign in to comment.