Useful BATCH files to RUN & UPLOAD the RESULTS to Seven Forums


  1. Posts : 6,021
    Win 7 HP SP1 64-bit Vista HB SP2 32-bit Linux Mint 18.3
       #1

    BATCH PROGRAMS [Standalone].


    The members and quests who use this forum know how professional, informative and helpful it is!

    In order to help members solve their problems/issues we often ask them to run certain programs and perform certain tasks and then upload [post] the results to the forum for us to look at. To help make doing these easier and possibly avoiding typing errors I have written the following batch scripts.

    NOTE: The light blue text below after => are links to the relevant batch scripts [download them to the desktop] and tutorials, just click them!

    chkdsk [Check Disk] - ALL Parameters . . .

    Click here [direct download] => CHKDSK_ALL_Parameters.bat.

    chkdsk is a Windows utility program for detecting and repairing any corruptions of the file system [FAT16, FAT32, and NTFS drives]. Sometimes this helps if you run it two or three times to get the full recovery of the file system.

    This batch script has 5 Options . . .

    Option [1] ABORT this process and EXIT.

    Option [2] chkdsk [non-invasive read-only and detect mode].
    This analyses the OS drive and reports any errors or corruptions, but doesn’t repair them.

    Option [3] chkdsk C: /F [repair mode].
    Run this if there any errors or corruptions reported when running the above. This one does repair any errors [file system errors or corruptions] on the OS drive but doesn’t scan for any bad sectors. This cannot be run while the HDD is in use [locked] and is therefore scheduled [displays a prompt] to be run at the next reboot. After it has run, Windows will automatically boot.

    Option [4] chkdsk C: /R [repair mode].
    Run this if there are still any errors or corruptions reported. This one does repair any errors [file system errors or corruptions] on the OS drive and does scan for any bad sectors. It then attempts to repair or recover any readable information [implies /F]. This cannot be run while the HDD is in use [locked] and is therefore scheduled [displays a prompt] to be run at the next reboot. After it has run, Windows will automatically boot.

    Option [5] Extract the chkdsk [ wininit ] log.
    This Extracts the current status [output data] for either chkdsk C: /F or chkdsk C: /R [which MUST be run FIRST in order to have the current run data available!] and creates a .txt [text] file on the desktop. It does NOT extract the current status [output data] for chkdsk [See the NOTE: below for this option].

    You will then need to upload the .txt file[s] from the desktop [see Upload to SevenForums below] for us to look at!

    NOTE: The chkdsk log can be extracted from the Event Viewer:

    [1] Click Start.
    [2] In the search box type eventvwr.msc and press Enter.
    [3] On the left-hand side under Event Viewer (Local) expand Windows Logs and click Application.
    [4] On the right-hand side under the Actions pane click Filter current log.
    [5] In the Event Sources: dropdown box list select Wininit and press Enter, then click OK.

    You should now only see the chkdsk log files displayed from the Wininit Event Sources and the information pertaining to each of them.

    [6] Double-click Wininit => Copy [at the bottom] => Paste into Notepad => Save to the desktop as chkdsk.txt.

    chkdsk [Check Disk] - Extract The WININIT Run Data Log . . .

    Click here [direct download] => CHKDSK_Extract_The_WININIT_Run_Data_Log.bat.

    This Extracts the current status [output data] for either chkdsk C: /F or chkdsk C: /R [which MUST be run FIRST in order to have the current run data available!] and creates a .txt [text] file on the desktop. It does NOT extract the current status [output data] for chkdsk [See the NOTE: at the bottom of the above section].

    You will then need to upload the .txt file from the desktop [see Upload to SevenForums below] for us to look at!

    Disk Cleanup - Extended . . .

    Click here [direct download] => Disk_Cleanup_Extended.bat.

    This allows you to free up HDD space by deleting temporary and not needed files etc from the HDD. It is an extension [advanced version] of the standard disk cleanup tool which allows hidden options to become available, allowing you to clean up even more HDD space.

    Check the appropriate boxes for the items that you want cleaned and press [OK].

    DXDIAG [DirectX Diagnostics] . . .

    Click here [direct download] => DX_Diag.bat.

    DxDiag is a MS diagnostic tool that is extremely useful for troubleshooting and identifying any problems or issues.

    It gives detailed [technical] information about the OS including make, model, OS version, GPU, CPU, BIOS, DirectX, hardware, drivers [outdated and missing drivers], audio, display, video and other multimedia applications and features etc.

    The information produced falls into the categories . . .

    System Information
    DxDiag Notes
    DirectX Debug Levels
    Display Devices
    Sound Devices
    Sound Capture Devices
    DirectInput Devices
    USB Devices
    Gameport Devices
    PS/2 Devices
    Disk & DVD/CD-ROM Drives
    System Devices
    DirectShow Filters

    Event Viewer - Clear ALL Logs . . .

    Click here [direct download] => Event_Viewer_Clear_ALL_Logs.bat.

    Over time, the Event Viewer gets very full and cluttered and makes troubleshooting extremely hard. If your OS has been running smoothly for a while without any problems then you can clear ALL the logs. This makes using the Event Viewer [if needed] a lot easier and manageable!

    ipconfig /all . . .

    Click here [direct download] => IP_Config_All.bat.

    The batch script creates a IP_Config_All.txt file on the desktop ready to upload to the forum [see Upload to SevenForums below] for us to look at!

    msinfo32 [MS System Information] . . .

    Click here [direct download] => MS_Info32.bat.

    msinfo32 is a Windows system information utility tool [system profiler] which collects information about your computer hardware configuration, computer components, software and drivers etc. It produces a comprehensive overview of your OS and is very useful for diagnosing computer issues.

    The batch script gives you 4 options . . .

    Option [1] ABORT this process and EXIT.
    Option [2] Open the msinfo32 consol Window.
    Option [3] Create a MSI_TXT.txt file on the desktop.
    Option [4] Create a MSI_NFO.nfo file on the desktop.

    msinfo32 [MS System Information] - Problem Devices . . .

    Click here [direct download] => MS_Info32_Find_Problem_Devices.bat.

    msinfo32 contains a wealth of information [see above]. One of the categories is MSINFO32 => System Summary => Components => Problem Devices which contains the description of the problem device[s] and the error code with the reason why it is a problem.

    The batch script extracts this information to a .txt [text] file on the desktop ready to upload to the forum [see Upload to SevenForums below] for us to look at!

    .NET Framework Versions Installed . . .

    Click here [direct download] => NET_Framework_Versions_Installed.bat.

    The batch script lists ALL the .NET Framework versions installed as defined in . . .

    C:\Windows\Microsoft.NET\Framework and . . .
    HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP.

    NOTE: Starting from .NET Framework 4.5, MS stores the .NET Framework versions via a key in the registry . . .

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\Release.

    Network Problems [Diagnose & Repair] . . .

    Click here [direct download] => Network_Problems_Diagnose_And_Repair.bat.

    The batch script not only collates the information required to diagnose network problems, but can also run network processes to hopefully correct them. The processes are . . .

    ipconfig /flushdns
    ipconfig /registerdns
    ipconfig /release
    ipconfig /renew
    netsh winsock reset [requires REBOOT]
    netsh.exe winhttp reset proxy [if there is one!]

    Network Statistics And Diagnostics . . .

    Click here [direct download] => Network_Statistics_And_Diagnostics.bat.

    The batch script produces a detailed analysis of network statistics and diagnostics. It produces comprehensive information on current settings and parameters as well as running some network diagnostics which are useful for trouble-shooting. Currently [more may be added later], the processes run are . . .

    hostname
    ver [MS Windows version]
    arp -a
    ipconfig /all
    getmac
    nbtstat -s
    net start
    netsh interface ipv4 show subinterfaces
    netsh interface show interface
    netsh interface tcp show global
    netsh lan show interfaces
    netsh lan show profiles
    netsh lan show settings
    netsh lan show tracing
    netsh wlan show autoconfig
    netsh wlan show blockednetworks
    netsh wlan show createalluserprofile
    netsh wlan show drivers
    netsh wlan show filters
    netsh wlan show interfaces
    netsh wlan show networks
    netsh wlan show networks mode=bssid
    netsh wlan show onlyUseGPProfilesforAllowedNetworks
    netsh wlan show profiles
    netsh wlan show settings
    netsh wlan show tracing
    netstat -a -b
    netstat -e
    netstat -r
    netstat -s
    nslookup www. google .com [Google]
    pathping 8.8.8.8 [Google]
    pathping www. google .com [Google]
    ping 8.8.8.8 -n 10 [Google]
    ping www. google .com -n 10 [Google]
    tracert 8.8.8.8 [Google]
    tracert www. google .com [Google]
    route print
    tasklist
    query HKEY_LOCAL_MACHINE
    query HKEY_CURRENT_USER

    NOTE: The batch script process can take a little while to run, so be patient!

    Programs And Software - Installed . . .

    Click here [direct download] => Programs_And_Software_Installed.bat.

    The batch script lists the installed programs and software.

    Option [2] produces exactly what is shown in Programs and Features.

    Option [3] produces a more comprehensive list because it not only produces exactly what is shown in Programs and Features, but also includes for example [among others] . . .

    Hotfix KB numbers for MS .NET Framework.
    MS .NET Framework.
    MS Office.
    MS SQL Server.
    MS Visual C++.
    Security updates for MS .NET Framework.
    Security updates for MS Office.
    Updates for MS .NET Framework.
    Updates for MS Office.

    etc . . .

    Required Clean And Repair Install Data . . .

    Click here [direct download] => Required_Clean_And_Repair_Install_Data.bat.

    I have written this batch script for members [and those members helping them] who are in the process of performing a clean or repair install. This data is useful for the members who haven't filled out their system specifications for one reason or another. The data produced includes everything that is needed in order to give the correct advice!

    The batch script creates a Clean_Repair.txt file on the desktop ready to upload to the forum [see Upload to SevenForums below] for us to look at!

    sfc [System File Checker] . . .

    Click here [direct download] => SFC_System_File_Checker.bat.

    SFC is a Windows utility program for detecting and repairing any corruptions in the protected system files of the OS. If any files are missing or corrupted, they are replaced from the cached copy which is located in the compressed folder %WinDir%\System32\dllcache.

    Once SFC has finished running, the scan results are shown in the cmd prompt window. SFC also creates a CBS.log in the temporary folder C:\Windows\Logs\CBS\. This log contains ALL the information generated from running SFC. The batch script copies this log to the desktop as CBS_Log.txt.

    As we are only really interested in the ERRORS, the batch script extracts the ERRORS ONLY from the CBS.log and creates a CBS_ERRORS.txt file on the desktop.

    The batch script can also create a compressed SFC_Up desktop folder and copy the CBS.log.txt & CBS_ERRORS.txt files into it.

    NOTE: If any ERRORS are reported, then run SFC again two or three more times, re-booting in between. For some reason, this can make a difference. I think it has to do with the settings.ini file sometimes showing false positives! If you still get a message saying "Windows Resource Protection found corrupt files but was unable to fix some of them", then either upload the files or the folder [see Upload to SevenForums below] for us to look at!

    Software Distribution Folder - Rename . . .

    Click here [direct download] => Software_Distribution_Folder_Rename.bat.

    If WU [Windows update] stops working then one option available is to rename the SoftwareDistribution folder to SoftwareDistribution.old and then run WU again [this will create a new SoftwareDistribution [database] folder]. Doing this enables you to restore [rename] the folder back if needed. If everything is OK then you can delete the SoftwareDistribution.old folder.

    IMPORTANT: Performing the above will mean that any WU’s that are currently pending [currently downloaded but haven’t been installed] prior to renaming the SoftwareDistribution folder will have to be downloaded again.

    The batch script stops wuauserv and bits, renames the SoftwareDistribution folder to SoftwareDistribution.old, restarts wuauserv and bits, then restarts the computer.

    NOTE: Renaming the SoftwareDistribution folder is a far better option than clearing it or deleting it because it contains essential components and update history data.

    SURT [System Update Readiness Tool] . . .

    Click here [direct download] => SURT.bat.

    SURT is a self-installing utility that executes when you install it [this will take a while to complete so be patient!]. It is used because of an inconsistency found in the Windows servicing store that may prevent the successful installation of updates, service packs, and software. It checks for these inconsistencies [integrity] and tries to fix any issues found. It supports all versions of Windows 7 SP1. When SURT is run, it creates two log files, CheckSUR.log & CheckSUR.persist.log, both in the temporary folder C:\Windows\Logs\CBS\. The batch script will copy these two files along with the CBS.log & WindowsUpdate.log to the desktop as individual files. The batch script can also create a compressed SURT_Up desktop folder and copy ALL of the aforementioned files into it, ready to upload to the forum [see Upload to SevenForums below] for us to look at!

    IMPORTANT: You MUST download ONE of the following files to the DESKTOP ONLY FIRST. The reason for this is that the batch script uses that desktop file to run SURT.

    SURT 32-bit download => SURT for Windows 7 x86-based Systems (KB947821) [October 2014].

    SURT 64-bit download => SURT for Windows 7 x64-based Systems (KB947821) [October 2014].

    SUGGESTION: It is advisable to SAVE & CLOSE ALL PROGRAMS before running the batch script!

    SUGGESTION: It is advisable to turn off the power options for sleep etc while SURT is running because it may take a while [so be patient!].

    System Reports . . .

    Click here [direct download] => System_Reports.bat.

    This batch script provides a selection of informative reports that are not only extremely useful for the information they contain but for troubleshooting and identifying any problems or issues. The options available are . . .

    0. EXIT this Program.

    1. Run COMPONENTS . . . Installed components.
    2. Run DXDIAG . . . MS diagnostic tool.
    3. Run IPCONFIG /ALL . . . All ipconfig information.
    4. Run MSINFO32 NFO . . . In depth MS information analysis tool.
    5. Run MSINFO32 TXT . . . In depth MS information analysis tool.
    6. Run NTEVENTLOG . . . Event Viewer statistics.
    7. Run PROCESSES . . . Processes running.
    8. Run PRODUCT . . . System installed software.
    9. Run QFE . . . WU and Hotfixes installed.
    10. Run SERVICES . . . Services running and stopped.
    11. Run STARTUP . . . Programs starting at Startup.
    12. Run SYSDRIVERS . . . Basic - Drivers running and stopped.
    13. Run SYSDRIVERS . . . Signed - Drivers that are signed and unsigned.
    14. RUN SYSDRIVERS . . . Verbose - Comprehensive drivers report.
    15. Run SYSTEMINFO . . . System information - BASIC.
    16. Run UNINSTALL . . . Uninstall information for installed software.

    99. Run ALL . . . Runs ALL of the above into a desktop folder.

    wmic [Windows Management Instrumentation Command] -
    Comprehensive Report . . .

    Click here [direct download] => wmic_Comprehensive_Report.bat.

    This batch script incorporates a comprehensive list of system information and settings that are compiled using the wmic. I have obviously not included all of the elements available [and I have certainly haven’t included every parameter available within those elements] but I have included those which I think are most useful and informative. The elements included are in alphabetical order and are as follows . . .

    BASEBOARD
    BIOS
    BOOTCONFIG
    CDROM
    COMPUTERSYSTEM
    CPU
    CSPRODUCT
    DESKTOPMONITOR
    DISKDRIVE
    ENVIRONMENT
    GROUP
    IDECONTROLLER
    LOGICALDISK
    MEMCACHE
    MEMPHYSICAL
    NETLOGIN
    NIC
    NTEVENTLOG
    ONBOARDDEVICE
    OS
    PARTITION
    PORTCONNECTOR
    PRODUCT
    RECOVEROS
    SCSICONTROLLER
    SOUNDDEV
    STARTUP
    SYSACCOUNT
    TIMEZONE
    USERACCOUNT
    VOLUME

    WU [Windows Update] - Hotfixes . . .

    Click here [direct download] => WU_Hotfixes.bat.

    I have used Microsoft's wmic [Windows Management Instrumentation Command] qfe list utility/tool to generate and output the list of WU's [Windows Updates] and Hotfixes [patches] installed and the date they were installed. The batch script creates a WU_Hotfixes.txt file on the desktop ready to upload to the forum [see Upload to SevenForums below] for us to look at!

    WU [Windows Update] - Log . . .

    Click here [direct download] => WU_Log.bat.

    By default, the WU client records all the transaction information into the log file located at %SystemRoot%\WindowsUpdate.log. The information generated is useful for troubleshooting and investigating problems/issues. The batch script creates a WU_Log.txt file on the desktop ready to upload to the forum [see Upload to SevenForums below] for us to look at!

    Upload to SevenForums . . .

    How to upload the file[s] => Screenshots & Files - Upload & Post.

    I hope you find the above useful!

    See my signature below for other programs! [I will hopefully be adding more in the future!]

    I am working on one at the moment to resolve problems with connecting to the Network!
    Last edited by Paul Black; 08 Nov 2019 at 15:30.
      My Computer


  2. Posts : 71,980
    64-bit Windows 11 Pro for Workstations
       #2
      My Computer


  3. Posts : 1,384
    Win 7 Ult 64-bit
       #3

    Useful collection! Thanks, Paul.
      My Computer


  4. Posts : 1,002
    XP Pro (x86) | 7 HP (x86) & (x64) | 7 Pro (x64)
       #4

    +1 and "ditto"
    Just came here having seen the BATCH PROGRAMS [Standalone]. link in your "signature"
    especially "Disk Cleanup - Extended"

    Thank you
      My Computer


  5. Posts : 6,021
    Win 7 HP SP1 64-bit Vista HB SP2 32-bit Linux Mint 18.3
    Thread Starter
       #5

    My => BATCH PROGRAMS [Standalone].


    RoWin7 said:
    Useful collection! Thanks, Paul.
    bawldiggle said:
    +1 and "ditto"
    Just came here having seen the BATCH PROGRAMS [Standalone]. link in your "signature" especially "Disk Cleanup - Extended"

    Thank you
    Thank you both and I hope you find them useful!
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 00:23.
Find Us