• sysinfo.bat Outputs desired system information to console & to a timestamped log file

    From Marion@marionf@fact.com to alt.comp.os.windows-10,alt.comp.os.windows-11,alt.msdos.batch on Sat Sep 27 19:44:13 2025
    From Newsgroup: alt.msdos.batch

    sysinfo.bat
    Outputs desired system information to console & to a timestamped log file.

    This sysinfo.bat file outputs on my system everything I can think of
    that doesn't require elevation. What's missing that you would want?

    @echo off
    REM Purpose: Outputs system information
    REM sysinfo.bat (version 1.0 20250922) output system information
    REM sysinfo.bat (version 1.1 20250923) added msinfo32 wrapper
    REM sysinfo.bat (version 1.2 20250924) added hotfixes & installed programs,
    REM firewall, winrm, secureboot, driver checks & write test
    REM sysinfo.bat (version 1.3 20250925) added driverquery, secureboot
    REM virtualization checks & directory existence/writability checks
    REM sysinfo.bat (version 1.4 20250927) commented out WinRM checks
    REM as they required elevated permissions. Kept all else.
    REM Usage: double-click, Win+R, or run from cmd.
    REM Outputs timestamped log (e.g., C:\data\sys\log\sysinfo20250927_123456.log)
    REM Comment linelength limit ===================================================
    :: CONFIGURATION
    set MSINFO_TIMEOUT=60 REM seconds to wait for msinfo32 before fallback
    set TARGET_HTTP=example.com
    set TARGET_PING=8.8.8.8
    set "LOGDIR=C:\data\sys\log" REM change if you prefer another directory

    if "%1"=="__LOGGING__" goto :run_script

    :: build timestamp (locale-safe for Windows 10)
    for /f "tokens=1-4 delims=/ " %%a in ("%DATE%") do (
    set DOW=%%a
    set MM=%%b
    set DD=%%c
    set YYYY=%%d
    )
    for /f "tokens=1-3 delims=:." %%a in ("%TIME%") do (
    set HH=%%a
    set Min=%%b
    set Sec=%%c
    )
    if "%HH:~0,1%"==" " set HH=0%HH:~1,1%

    set LOGSTAMP=%YYYY%%MM%%DD%_%HH%%Min%%Sec%
    set "LOGFILE=%LOGDIR%\sysinfo%LOGSTAMP%.log"
    set "TMPTXT=%LOGDIR%\sysinfo%LOGSTAMP%.tmp"

    :: Ensure required directories exist (creates LOGDIR and parents if needed)
    if not exist "%LOGDIR%" (
    md "%LOGDIR%" 2>nul
    if errorlevel 1 echo WARNING: failed to create %LOGDIR%
    )

    :: Stream the second invocation live; Tee-Object writes an intermediate text file
    powershell -NoProfile -Command ^
    " & { & cmd /c '\"%~f0\" __LOGGING__' 2>&1 | Tee-Object -FilePath '%TMPTXT%' }"

    :: Convert intermediate file to UTF-8 without BOM and remove temp
    powershell -NoProfile -Command ^
    " [System.IO.File]::WriteAllText('%LOGFILE%', (Get-Content -Raw -LiteralPath '%TMPTXT%'), (New-Object System.Text.UTF8Encoding($false))); Remove-Item -LiteralPath '%TMPTXT%' -ErrorAction SilentlyContinue"

    echo.
    echo Log created at %LOGFILE%
    echo.
    pause
    exit /b

    :run_script
    echo [%DATE% %TIME%] sysinfo starting...
    echo ==============================================

    REM SECTION: invocation and basic info
    echo script = %~f0
    echo args = %*
    echo COMSPEC = %COMSPEC%
    echo current user = %USERNAME%\%USERDOMAIN%
    echo user profile = %USERPROFILE%
    echo local appdata = %LOCALAPPDATA%
    echo temp = %TEMP%
    echo

    REM SECTION: ensure directories needed and test writability
    REM Ensure the log directory exists and is writable by this user
    echo -- Directory checks --
    echo LOGDIR = %LOGDIR%
    if exist "%LOGDIR%" ( echo LOGDIR exists ) else ( echo LOGDIR missing )
    echo -- test write access to LOGDIR --
    "%LOGDIR%\._sysinfo_dir_test" echo OK 2>nul || echo write test failed for %LOGDIR%
    if exist "%LOGDIR%\._sysinfo_dir_test" del "%LOGDIR%\._sysinfo_dir_test" >nul 2>nul
    echo REM If the write test fails, logs may not be saved.
    echo

    REM SECTION: OS and system info
    echo -- OS basic --
    ver
    systeminfo | findstr /B /C:"OS Name" /C:"OS Version" /C:"System Boot Time" 2>nul || systeminfo | findstr /I "OS" 2>nul
    echo

    REM SECTION: Powershell and path
    echo -- PowerShell and execution policy --
    where powershell 2>nul || echo powershell NOTFOUND
    powershell -NoProfile -Command "$PSVersionTable.PSVersion; Get-ExecutionPolicy -List" 2>nul || echo PowerShell info not available
    echo

    REM SECTION: environment and PATH
    echo -- Environment variables --
    echo PATH = %PATH%
    echo PROGRAMFILES = %PROGRAMFILES%
    echo PROGRAMFILES(X86) = %PROGRAMFILES(X86)%
    echo PROGRAMDATA = %PROGRAMDATA%
    echo TEMP = %TEMP%
    echo

    REM SECTION: filesystem and free space
    echo -- Filesystem free space --
    wmic logicaldisk get name,freespace,filesystem 2>nul
    echo

    REM SECTION: code page and locale
    echo -- Code page and locale --
    chcp
    powershell -NoProfile -Command "[System.Globalization.CultureInfo]::InstalledUICulture.DisplayName" 2>nul
    echo

    REM SECTION: networking basics
    echo -- Networking: adapters, routes, listeners --
    ipconfig /all
    echo ------------------------
    route print
    echo ------------------------
    netstat -ano
    echo ------------------------
    echo -- DNS/HTTP check --
    nslookup %TARGET_HTTP%
    echo ------------------------
    ping -n 4 %TARGET_PING%
    echo

    REM SECTION: proxy and WinHTTP settings
    echo -- Proxy and WinHTTP --
    reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable 2>nul
    reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer 2>nul
    reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v AutoConfigURL 2>nul
    reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v AutoDetect 2>nul
    echo netsh winhttp show proxy
    netsh winhttp show proxy
    echo

    REM SECTION: installed tools and versions
    echo -- Installed tools (where/versions if present) --
    where curl 2>nul || echo curl NOTFOUND
    where git 2>nul || echo git NOTFOUND
    where python 2>nul || echo python NOTFOUND
    where node 2>nul || echo node NOTFOUND
    where gvim 2>nul || echo gvim NOTFOUND
    echo
    where curl 2>nul && curl -s --version 2>nul || echo curl version unknown
    echo

    REM SECTION: installed hotfixes and programs
    echo -- Installed hotfixes (quick list) --
    wmic qfe get HotFixID,InstalledOn 2>nul || echo qfe list not available
    echo
    echo -- Installed programs (registry uninstall keys, compact) --
    reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" /s /v DisplayName 2>nul | findstr /I /C:"DisplayName" || echo no registry uninstall info
    echo

    REM SECTION: firewall and remote config
    echo -- Windows Firewall state --
    netsh advfirewall show allprofiles state 2>nul
    echo -- Firewall outbound block rules (summary) --
    netsh advfirewall firewall show rule name=all | findstr /I /C:"Block" 2>nul
    REM -- WinRM / Remote Management --
    REM WinRM checks commented out per user request; enabling WinRM requires admin actions and firewall changes
    REM winrm quickconfig 2>nul
    echo

    REM SECTION: services and scheduled tasks (summary)
    echo -- Services summary --
    sc query state= all | findstr /I /C:"SERVICE_NAME" /C:"DISPLAY_NAME" 2>nul
    echo -- Scheduled tasks (verbose list) --
    schtasks /query /fo LIST /v 2>nul
    echo

    REM SECTION: user rights and elevation
    echo -- User rights --
    whoami /groups
    net session >nul 2>&1 && echo ELEVATED || echo NOT_ELEVATED
    echo

    REM SECTION: PATH search sample
    echo -- PATH search sample --
    where cmd 2>nul
    where powershell 2>nul
    where curl 2>nul
    echo

    REM SECTION: driver summary
    echo -- Driver query (brief) --
    driverquery /fo table /v 2>nul | findstr /I /C:"Driver" /C:"State" || echo driverquery not available
    echo

    REM ---------- msinfo32 with spinner and timeout using temporary PS script ----------
    echo SECTION: msinfo32 brief report (may take a while)
    set "MSINFO_TXT=%TEMP%\msinfo_report.txt"
    if exist "%MSINFO_TXT%" del "%MSINFO_TXT%" >nul 2>&1

    echo Running msinfo32 (may take up to %MSINFO_TIMEOUT% seconds)... please wait

    :: create temporary PowerShell script (ASCII-safe)
    set "PS1=%TEMP%\diag_msinfo_wrapper.ps1"
    "%PS1%" (
    echo $out = "%MSINFO_TXT%"
    echo $timeout = %MSINFO_TIMEOUT%
    echo $p = Start-Process -FilePath "msinfo32.exe" -ArgumentList "/report",$out -PassThru
    echo $sw = [Diagnostics.Stopwatch]::StartNew()
    echo while(-not (Test-Path $out) -and $sw.Elapsed.TotalSeconds -lt $timeout) {
    echo Write-Host -NoNewline "."
    echo Start-Sleep -Seconds 1
    echo }
    echo Write-Host ""
    echo if(Test-Path $out) {
    echo Write-Output "--- start msinfo32 report ---"
    echo Get-Content -Path $out ^| Select-String -Pattern "^(System Model|System Manufacturer|BIOS Version|BIOS Date|OS Name|OS Version|System Type|Total Physical Memory|Available Physical Memory)" -SimpleMatch
    echo Write-Output "--- end msinfo32 report ---"
    echo } else {
    echo Write-Output ("msinfo32 timed out after " + $timeout + " seconds; killing msinfo32 and showing compact WMI fallback")
    echo try { Stop-Process -Id $p.Id -Force -ErrorAction SilentlyContinue } catch {}
    echo $f = Get-CimInstance Win32_ComputerSystem
    echo $b = Get-CimInstance Win32_BIOS
    echo Write-Output ("System Manufacturer: " + $f.Manufacturer)
    echo Write-Output ("System Model: " + $f.Model)
    echo Write-Output ("System Type: " + $f.SystemType)
    echo Write-Output ("Total Physical Memory: " + ([math]::Round($f.TotalPhysicalMemory/1MB)) + " MB")
    echo Write-Output ("BIOS Version: " + $b.SMBIOSBIOSVersion)
    echo Write-Output ("BIOS Date: " + $b.ReleaseDate)
    echo }
    )

    :: run the temporary PowerShell script
    powershell -NoProfile -ExecutionPolicy Bypass -File "%PS1%"

    :: remove the temporary PowerShell script
    del "%PS1%" >nul 2>&1

    echo

    REM SECTION: PowerShell Get-ComputerInfo selected fields
    echo -- Get-ComputerInfo selected fields --
    powershell -NoProfile -Command ^
    " $ci = Get-ComputerInfo; ^
    $props = 'CsName','WindowsProductName','WindowsVersion','OsBuildNumber','OsArchitecture','OsHotFixes','CsManufacturer','CsModel','CsSystemType','BiosManufacturer','BiosVersion','BiosReleaseDate','CsProcessors','CsTotalPhysicalMemory'; ^
    foreach($p in $props) { if($ci.$p -ne $null) { Write-Output ($p + ': ' + ($ci.$p -join ', ')) } } " 2>nul || echo Get-ComputerInfo not available
    echo

    REM SECTION: Secure Boot and virtualization
    echo -- Secure Boot and virtualization --
    powershell -NoProfile -Command "if (Get-ItemProperty -Path HKLM:\\SYSTEM\\CurrentControlSet\\Control\\SecureBoot\\State -Name UEFISecureBootEnabled -ErrorAction SilentlyContinue) { Write-Output 'SecureBoot: Enabled' } else { Write-Output 'SecureBoot: Disabled or not supported' }" 2>nul || echo SecureBoot check not available
    powershell -NoProfile -Command "Get-CimInstance Win32_ComputerSystem | Select-Object -Property HypervisorPresent,TotalPhysicalMemory" 2>nul || echo virtualization info not available
    echo

    REM SECTION: important environment variables
    echo USERNAME = %USERNAME%
    echo USERDOMAIN = %USERDOMAIN%
    echo COMPUTERNAME = %COMPUTERNAME%
    echo HOMEDRIVE = %HOMEDRIVE%
    echo HOMEPATH = %HOMEPATH%
    echo USERPROFILE = %USERPROFILE%
    echo LOCALAPPDATA = %LOCALAPPDATA%
    echo PROGRAMFILES = %PROGRAMFILES%
    echo PROGRAMFILES(X86) = %PROGRAMFILES(X86)%
    echo PROGRAMDATA = %PROGRAMDATA%
    echo PATH = %PATH%
    echo

    REM SECTION: script context and permissions
    echo current directory = %CD%
    echo script fullpath = %~f0
    echo script drive = %~d0
    echo script folder = %~dp0
    echo args = %*
    icacls "%LOGDIR%" 2>nul || echo icacls unavailable
    echo

    REM SECTION: final notes and guidance for readers
    echo -- Notes --
    echo 1) This script writes the final log as UTF-8 without BOM so modern tools can parse it.
    echo 2) Save this batch file ANSI or UTF-8 without BOM to avoid BOM artifacts in cmd display.
    echo 3) msinfo32 may take up to %MSINFO_TIMEOUT% seconds; the script shows a dot spinner and falls back to a WMI summary if timed out.
    echo 4) TARGET_HTTP and TARGET_PING are configurable at the top of this file.
    echo 5) If you attach the produced log, include the first 30 lines and any error sections.
    echo
    echo Please attach the produced log file sysinfo%LOGSTAMP%.log when asking for help.
    echo ==============================================
    exit /b
    --
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Hank Rogers@Hank@nospam.invalid to alt.comp.os.windows-10,alt.comp.os.windows-11,alt.msdos.batch on Sat Sep 27 19:36:42 2025
    From Newsgroup: alt.msdos.batch

    Marion wrote on 9/27/2025 2:44 PM:
    sysinfo.bat
    Outputs desired system information to console & to a timestamped log file.

    This sysinfo.bat file outputs on my system everything I can think of
    that doesn't require elevation. What's missing that you would want?

    @echo off
    REM Purpose: Outputs system information
    REM sysinfo.bat (version 1.0 20250922) output system information
    REM sysinfo.bat (version 1.1 20250923) added msinfo32 wrapper
    REM sysinfo.bat (version 1.2 20250924) added hotfixes & installed programs,
    REM firewall, winrm, secureboot, driver checks & write test
    REM sysinfo.bat (version 1.3 20250925) added driverquery, secureboot
    REM virtualization checks & directory existence/writability checks
    REM sysinfo.bat (version 1.4 20250927) commented out WinRM checks
    REM as they required elevated permissions. Kept all else.
    REM Usage: double-click, Win+R, or run from cmd.
    REM Outputs timestamped log (e.g., C:\data\sys\log\sysinfo20250927_123456.log)
    REM Comment linelength limit ===================================================
    :: CONFIGURATION
    set MSINFO_TIMEOUT=60 REM seconds to wait for msinfo32 before fallback
    set TARGET_HTTP=example.com
    set TARGET_PING=8.8.8.8
    set "LOGDIR=C:\data\sys\log" REM change if you prefer another directory

    if "%1"=="__LOGGING__" goto :run_script

    :: build timestamp (locale-safe for Windows 10)
    for /f "tokens=1-4 delims=/ " %%a in ("%DATE%") do (
    set DOW=%%a
    set MM=%%b
    set DD=%%c
    set YYYY=%%d
    )
    for /f "tokens=1-3 delims=:." %%a in ("%TIME%") do (
    set HH=%%a
    set Min=%%b
    set Sec=%%c
    )
    if "%HH:~0,1%"==" " set HH=0%HH:~1,1%

    set LOGSTAMP=%YYYY%%MM%%DD%_%HH%%Min%%Sec%
    set "LOGFILE=%LOGDIR%\sysinfo%LOGSTAMP%.log"
    set "TMPTXT=%LOGDIR%\sysinfo%LOGSTAMP%.tmp"

    :: Ensure required directories exist (creates LOGDIR and parents if needed)
    if not exist "%LOGDIR%" (
    md "%LOGDIR%" 2>nul
    if errorlevel 1 echo WARNING: failed to create %LOGDIR%
    )

    :: Stream the second invocation live; Tee-Object writes an intermediate text file
    powershell -NoProfile -Command ^
    " & { & cmd /c '\"%~f0\" __LOGGING__' 2>&1 | Tee-Object -FilePath '%TMPTXT%' }"

    :: Convert intermediate file to UTF-8 without BOM and remove temp
    powershell -NoProfile -Command ^
    " [System.IO.File]::WriteAllText('%LOGFILE%', (Get-Content -Raw -LiteralPath '%TMPTXT%'), (New-Object System.Text.UTF8Encoding($false))); Remove-Item -LiteralPath '%TMPTXT%' -ErrorAction SilentlyContinue"

    echo.
    echo Log created at %LOGFILE%
    echo.
    pause
    exit /b

    :run_script
    echo [%DATE% %TIME%] sysinfo starting...
    echo ==============================================

    REM SECTION: invocation and basic info
    echo script = %~f0
    echo args = %*
    echo COMSPEC = %COMSPEC%
    echo current user = %USERNAME%\%USERDOMAIN%
    echo user profile = %USERPROFILE%
    echo local appdata = %LOCALAPPDATA%
    echo temp = %TEMP%
    echo

    REM SECTION: ensure directories needed and test writability
    REM Ensure the log directory exists and is writable by this user
    echo -- Directory checks --
    echo LOGDIR = %LOGDIR%
    if exist "%LOGDIR%" ( echo LOGDIR exists ) else ( echo LOGDIR missing )
    echo -- test write access to LOGDIR --
    > "%LOGDIR%\._sysinfo_dir_test" echo OK 2>nul || echo write test failed for %LOGDIR%
    if exist "%LOGDIR%\._sysinfo_dir_test" del "%LOGDIR%\._sysinfo_dir_test" >nul 2>nul
    echo REM If the write test fails, logs may not be saved.
    echo

    REM SECTION: OS and system info
    echo -- OS basic --
    ver
    systeminfo | findstr /B /C:"OS Name" /C:"OS Version" /C:"System Boot Time" 2>nul || systeminfo | findstr /I "OS" 2>nul
    echo

    REM SECTION: Powershell and path
    echo -- PowerShell and execution policy --
    where powershell 2>nul || echo powershell NOTFOUND
    powershell -NoProfile -Command "$PSVersionTable.PSVersion; Get-ExecutionPolicy -List" 2>nul || echo PowerShell info not available
    echo

    REM SECTION: environment and PATH
    echo -- Environment variables --
    echo PATH = %PATH%
    echo PROGRAMFILES = %PROGRAMFILES%
    echo PROGRAMFILES(X86) = %PROGRAMFILES(X86)%
    echo PROGRAMDATA = %PROGRAMDATA%
    echo TEMP = %TEMP%
    echo

    REM SECTION: filesystem and free space
    echo -- Filesystem free space --
    wmic logicaldisk get name,freespace,filesystem 2>nul
    echo

    REM SECTION: code page and locale
    echo -- Code page and locale --
    chcp
    powershell -NoProfile -Command "[System.Globalization.CultureInfo]::InstalledUICulture.DisplayName" 2>nul
    echo

    REM SECTION: networking basics
    echo -- Networking: adapters, routes, listeners --
    ipconfig /all
    echo ------------------------
    route print
    echo ------------------------
    netstat -ano
    echo ------------------------
    echo -- DNS/HTTP check --
    nslookup %TARGET_HTTP%
    echo ------------------------
    ping -n 4 %TARGET_PING%
    echo

    REM SECTION: proxy and WinHTTP settings
    echo -- Proxy and WinHTTP --
    reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable 2>nul
    reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer 2>nul
    reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v AutoConfigURL 2>nul
    reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v AutoDetect 2>nul
    echo netsh winhttp show proxy
    netsh winhttp show proxy
    echo

    REM SECTION: installed tools and versions
    echo -- Installed tools (where/versions if present) --
    where curl 2>nul || echo curl NOTFOUND
    where git 2>nul || echo git NOTFOUND
    where python 2>nul || echo python NOTFOUND
    where node 2>nul || echo node NOTFOUND
    where gvim 2>nul || echo gvim NOTFOUND
    echo
    where curl 2>nul && curl -s --version 2>nul || echo curl version unknown
    echo

    REM SECTION: installed hotfixes and programs
    echo -- Installed hotfixes (quick list) --
    wmic qfe get HotFixID,InstalledOn 2>nul || echo qfe list not available
    echo
    echo -- Installed programs (registry uninstall keys, compact) --
    reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" /s /v DisplayName 2>nul | findstr /I /C:"DisplayName" || echo no registry uninstall info
    echo

    REM SECTION: firewall and remote config
    echo -- Windows Firewall state --
    netsh advfirewall show allprofiles state 2>nul
    echo -- Firewall outbound block rules (summary) --
    netsh advfirewall firewall show rule name=all | findstr /I /C:"Block" 2>nul
    REM -- WinRM / Remote Management --
    REM WinRM checks commented out per user request; enabling WinRM requires admin actions and firewall changes
    REM winrm quickconfig 2>nul
    echo

    REM SECTION: services and scheduled tasks (summary)
    echo -- Services summary --
    sc query state= all | findstr /I /C:"SERVICE_NAME" /C:"DISPLAY_NAME" 2>nul
    echo -- Scheduled tasks (verbose list) --
    schtasks /query /fo LIST /v 2>nul
    echo

    REM SECTION: user rights and elevation
    echo -- User rights --
    whoami /groups
    net session >nul 2>&1 && echo ELEVATED || echo NOT_ELEVATED
    echo

    REM SECTION: PATH search sample
    echo -- PATH search sample --
    where cmd 2>nul
    where powershell 2>nul
    where curl 2>nul
    echo

    REM SECTION: driver summary
    echo -- Driver query (brief) --
    driverquery /fo table /v 2>nul | findstr /I /C:"Driver" /C:"State" || echo driverquery not available
    echo

    REM ---------- msinfo32 with spinner and timeout using temporary PS script ----------
    echo SECTION: msinfo32 brief report (may take a while)
    set "MSINFO_TXT=%TEMP%\msinfo_report.txt"
    if exist "%MSINFO_TXT%" del "%MSINFO_TXT%" >nul 2>&1

    echo Running msinfo32 (may take up to %MSINFO_TIMEOUT% seconds)... please wait

    :: create temporary PowerShell script (ASCII-safe)
    set "PS1=%TEMP%\diag_msinfo_wrapper.ps1"
    > "%PS1%" (
    echo $out = "%MSINFO_TXT%"
    echo $timeout = %MSINFO_TIMEOUT%
    echo $p = Start-Process -FilePath "msinfo32.exe" -ArgumentList "/report",$out -PassThru
    echo $sw = [Diagnostics.Stopwatch]::StartNew()
    echo while(-not (Test-Path $out) -and $sw.Elapsed.TotalSeconds -lt $timeout) {
    echo Write-Host -NoNewline "."
    echo Start-Sleep -Seconds 1
    echo }
    echo Write-Host ""
    echo if(Test-Path $out) {
    echo Write-Output "--- start msinfo32 report ---"
    echo Get-Content -Path $out ^| Select-String -Pattern "^(System Model|System Manufacturer|BIOS Version|BIOS Date|OS Name|OS Version|System Type|Total Physical Memory|Available Physical Memory)" -SimpleMatch
    echo Write-Output "--- end msinfo32 report ---"
    echo } else {
    echo Write-Output ("msinfo32 timed out after " + $timeout + " seconds; killing msinfo32 and showing compact WMI fallback")
    echo try { Stop-Process -Id $p.Id -Force -ErrorAction SilentlyContinue } catch {}
    echo $f = Get-CimInstance Win32_ComputerSystem
    echo $b = Get-CimInstance Win32_BIOS
    echo Write-Output ("System Manufacturer: " + $f.Manufacturer)
    echo Write-Output ("System Model: " + $f.Model)
    echo Write-Output ("System Type: " + $f.SystemType)
    echo Write-Output ("Total Physical Memory: " + ([math]::Round($f.TotalPhysicalMemory/1MB)) + " MB")
    echo Write-Output ("BIOS Version: " + $b.SMBIOSBIOSVersion)
    echo Write-Output ("BIOS Date: " + $b.ReleaseDate)
    echo }
    )

    :: run the temporary PowerShell script
    powershell -NoProfile -ExecutionPolicy Bypass -File "%PS1%"

    :: remove the temporary PowerShell script
    del "%PS1%" >nul 2>&1

    echo

    REM SECTION: PowerShell Get-ComputerInfo selected fields
    echo -- Get-ComputerInfo selected fields --
    powershell -NoProfile -Command ^
    " $ci = Get-ComputerInfo; ^
    $props = 'CsName','WindowsProductName','WindowsVersion','OsBuildNumber','OsArchitecture','OsHotFixes','CsManufacturer','CsModel','CsSystemType','BiosManufacturer','BiosVersion','BiosReleaseDate','CsProcessors','CsTotalPhysicalMemory'; ^
    foreach($p in $props) { if($ci.$p -ne $null) { Write-Output ($p + ': ' + ($ci.$p -join ', ')) } } " 2>nul || echo Get-ComputerInfo not available
    echo

    REM SECTION: Secure Boot and virtualization
    echo -- Secure Boot and virtualization --
    powershell -NoProfile -Command "if (Get-ItemProperty -Path HKLM:\\SYSTEM\\CurrentControlSet\\Control\\SecureBoot\\State -Name UEFISecureBootEnabled -ErrorAction SilentlyContinue) { Write-Output 'SecureBoot: Enabled' } else { Write-Output 'SecureBoot: Disabled or not supported' }" 2>nul || echo SecureBoot check not available
    powershell -NoProfile -Command "Get-CimInstance Win32_ComputerSystem | Select-Object -Property HypervisorPresent,TotalPhysicalMemory" 2>nul || echo virtualization info not available
    echo

    REM SECTION: important environment variables
    echo USERNAME = %USERNAME%
    echo USERDOMAIN = %USERDOMAIN%
    echo COMPUTERNAME = %COMPUTERNAME%
    echo HOMEDRIVE = %HOMEDRIVE%
    echo HOMEPATH = %HOMEPATH%
    echo USERPROFILE = %USERPROFILE%
    echo LOCALAPPDATA = %LOCALAPPDATA%
    echo PROGRAMFILES = %PROGRAMFILES%
    echo PROGRAMFILES(X86) = %PROGRAMFILES(X86)%
    echo PROGRAMDATA = %PROGRAMDATA%
    echo PATH = %PATH%
    echo

    REM SECTION: script context and permissions
    echo current directory = %CD%
    echo script fullpath = %~f0
    echo script drive = %~d0
    echo script folder = %~dp0
    echo args = %*
    icacls "%LOGDIR%" 2>nul || echo icacls unavailable
    echo

    REM SECTION: final notes and guidance for readers
    echo -- Notes --
    echo 1) This script writes the final log as UTF-8 without BOM so modern tools can parse it.
    echo 2) Save this batch file ANSI or UTF-8 without BOM to avoid BOM artifacts in cmd display.
    echo 3) msinfo32 may take up to %MSINFO_TIMEOUT% seconds; the script shows a dot spinner and falls back to a WMI summary if timed out.
    echo 4) TARGET_HTTP and TARGET_PING are configurable at the top of this file.
    echo 5) If you attach the produced log, include the first 30 lines and any error sections.
    echo
    echo Please attach the produced log file sysinfo%LOGSTAMP%.log when asking for help.
    echo ==============================================
    exit /b



    I dunno man, but there sure are a lot of echoes in there :)

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Zaidy036@Zaidy036@air.isp.spam to alt.comp.os.windows-10,alt.comp.os.windows-11,alt.msdos.batch on Sat Sep 27 21:19:23 2025
    From Newsgroup: alt.msdos.batch

    On 9/27/2025 3:44 PM, Marion wrote:
    sysinfo.bat
    Outputs desired system information to console & to a timestamped log file.

    This sysinfo.bat file outputs on my system everything I can think of
    that doesn't require elevation. What's missing that you would want?

    @echo off
    REM Purpose: Outputs system information
    REM sysinfo.bat (version 1.0 20250922) output system information
    REM sysinfo.bat (version 1.1 20250923) added msinfo32 wrapper
    REM sysinfo.bat (version 1.2 20250924) added hotfixes & installed programs,
    REM firewall, winrm, secureboot, driver checks & write test
    REM sysinfo.bat (version 1.3 20250925) added driverquery, secureboot
    REM virtualization checks & directory existence/writability checks
    REM sysinfo.bat (version 1.4 20250927) commented out WinRM checks
    REM as they required elevated permissions. Kept all else.
    REM Usage: double-click, Win+R, or run from cmd.
    REM Outputs timestamped log (e.g., C:\data\sys\log\sysinfo20250927_123456.log)
    REM Comment linelength limit ===================================================
    :: CONFIGURATION
    set MSINFO_TIMEOUT=60 REM seconds to wait for msinfo32 before fallback
    set TARGET_HTTP=example.com
    set TARGET_PING=8.8.8.8
    set "LOGDIR=C:\data\sys\log" REM change if you prefer another directory

    if "%1"=="__LOGGING__" goto :run_script

    :: build timestamp (locale-safe for Windows 10)
    for /f "tokens=1-4 delims=/ " %%a in ("%DATE%") do (
    set DOW=%%a
    set MM=%%b
    set DD=%%c
    set YYYY=%%d
    )
    for /f "tokens=1-3 delims=:." %%a in ("%TIME%") do (
    set HH=%%a
    set Min=%%b
    set Sec=%%c
    )
    if "%HH:~0,1%"==" " set HH=0%HH:~1,1%

    set LOGSTAMP=%YYYY%%MM%%DD%_%HH%%Min%%Sec%
    set "LOGFILE=%LOGDIR%\sysinfo%LOGSTAMP%.log"
    set "TMPTXT=%LOGDIR%\sysinfo%LOGSTAMP%.tmp"

    :: Ensure required directories exist (creates LOGDIR and parents if needed)
    if not exist "%LOGDIR%" (
    md "%LOGDIR%" 2>nul
    if errorlevel 1 echo WARNING: failed to create %LOGDIR%
    )

    :: Stream the second invocation live; Tee-Object writes an intermediate text file
    powershell -NoProfile -Command ^
    " & { & cmd /c '\"%~f0\" __LOGGING__' 2>&1 | Tee-Object -FilePath '%TMPTXT%' }"

    :: Convert intermediate file to UTF-8 without BOM and remove temp
    powershell -NoProfile -Command ^
    " [System.IO.File]::WriteAllText('%LOGFILE%', (Get-Content -Raw -LiteralPath '%TMPTXT%'), (New-Object System.Text.UTF8Encoding($false))); Remove-Item -LiteralPath '%TMPTXT%' -ErrorAction SilentlyContinue"

    echo.
    echo Log created at %LOGFILE%
    echo.
    pause
    exit /b

    :run_script
    echo [%DATE% %TIME%] sysinfo starting...
    echo ==============================================

    REM SECTION: invocation and basic info
    echo script = %~f0
    echo args = %*
    echo COMSPEC = %COMSPEC%
    echo current user = %USERNAME%\%USERDOMAIN%
    echo user profile = %USERPROFILE%
    echo local appdata = %LOCALAPPDATA%
    echo temp = %TEMP%
    echo

    REM SECTION: ensure directories needed and test writability
    REM Ensure the log directory exists and is writable by this user
    echo -- Directory checks --
    echo LOGDIR = %LOGDIR%
    if exist "%LOGDIR%" ( echo LOGDIR exists ) else ( echo LOGDIR missing )
    echo -- test write access to LOGDIR --
    > "%LOGDIR%\._sysinfo_dir_test" echo OK 2>nul || echo write test failed for %LOGDIR%
    if exist "%LOGDIR%\._sysinfo_dir_test" del "%LOGDIR%\._sysinfo_dir_test" >nul 2>nul
    echo REM If the write test fails, logs may not be saved.
    echo

    REM SECTION: OS and system info
    echo -- OS basic --
    ver
    systeminfo | findstr /B /C:"OS Name" /C:"OS Version" /C:"System Boot Time" 2>nul || systeminfo | findstr /I "OS" 2>nul
    echo

    REM SECTION: Powershell and path
    echo -- PowerShell and execution policy --
    where powershell 2>nul || echo powershell NOTFOUND
    powershell -NoProfile -Command "$PSVersionTable.PSVersion; Get-ExecutionPolicy -List" 2>nul || echo PowerShell info not available
    echo

    REM SECTION: environment and PATH
    echo -- Environment variables --
    echo PATH = %PATH%
    echo PROGRAMFILES = %PROGRAMFILES%
    echo PROGRAMFILES(X86) = %PROGRAMFILES(X86)%
    echo PROGRAMDATA = %PROGRAMDATA%
    echo TEMP = %TEMP%
    echo

    REM SECTION: filesystem and free space
    echo -- Filesystem free space --
    wmic logicaldisk get name,freespace,filesystem 2>nul
    echo

    REM SECTION: code page and locale
    echo -- Code page and locale --
    chcp
    powershell -NoProfile -Command "[System.Globalization.CultureInfo]::InstalledUICulture.DisplayName" 2>nul
    echo

    REM SECTION: networking basics
    echo -- Networking: adapters, routes, listeners --
    ipconfig /all
    echo ------------------------
    route print
    echo ------------------------
    netstat -ano
    echo ------------------------
    echo -- DNS/HTTP check --
    nslookup %TARGET_HTTP%
    echo ------------------------
    ping -n 4 %TARGET_PING%
    echo

    REM SECTION: proxy and WinHTTP settings
    echo -- Proxy and WinHTTP --
    reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable 2>nul
    reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer 2>nul
    reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v AutoConfigURL 2>nul
    reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v AutoDetect 2>nul
    echo netsh winhttp show proxy
    netsh winhttp show proxy
    echo

    REM SECTION: installed tools and versions
    echo -- Installed tools (where/versions if present) --
    where curl 2>nul || echo curl NOTFOUND
    where git 2>nul || echo git NOTFOUND
    where python 2>nul || echo python NOTFOUND
    where node 2>nul || echo node NOTFOUND
    where gvim 2>nul || echo gvim NOTFOUND
    echo
    where curl 2>nul && curl -s --version 2>nul || echo curl version unknown
    echo

    REM SECTION: installed hotfixes and programs
    echo -- Installed hotfixes (quick list) --
    wmic qfe get HotFixID,InstalledOn 2>nul || echo qfe list not available
    echo
    echo -- Installed programs (registry uninstall keys, compact) --
    reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" /s /v DisplayName 2>nul | findstr /I /C:"DisplayName" || echo no registry uninstall info
    echo

    REM SECTION: firewall and remote config
    echo -- Windows Firewall state --
    netsh advfirewall show allprofiles state 2>nul
    echo -- Firewall outbound block rules (summary) --
    netsh advfirewall firewall show rule name=all | findstr /I /C:"Block" 2>nul
    REM -- WinRM / Remote Management --
    REM WinRM checks commented out per user request; enabling WinRM requires admin actions and firewall changes
    REM winrm quickconfig 2>nul
    echo

    REM SECTION: services and scheduled tasks (summary)
    echo -- Services summary --
    sc query state= all | findstr /I /C:"SERVICE_NAME" /C:"DISPLAY_NAME" 2>nul
    echo -- Scheduled tasks (verbose list) --
    schtasks /query /fo LIST /v 2>nul
    echo

    REM SECTION: user rights and elevation
    echo -- User rights --
    whoami /groups
    net session >nul 2>&1 && echo ELEVATED || echo NOT_ELEVATED
    echo

    REM SECTION: PATH search sample
    echo -- PATH search sample --
    where cmd 2>nul
    where powershell 2>nul
    where curl 2>nul
    echo

    REM SECTION: driver summary
    echo -- Driver query (brief) --
    driverquery /fo table /v 2>nul | findstr /I /C:"Driver" /C:"State" || echo driverquery not available
    echo

    REM ---------- msinfo32 with spinner and timeout using temporary PS script ----------
    echo SECTION: msinfo32 brief report (may take a while)
    set "MSINFO_TXT=%TEMP%\msinfo_report.txt"
    if exist "%MSINFO_TXT%" del "%MSINFO_TXT%" >nul 2>&1

    echo Running msinfo32 (may take up to %MSINFO_TIMEOUT% seconds)... please wait

    :: create temporary PowerShell script (ASCII-safe)
    set "PS1=%TEMP%\diag_msinfo_wrapper.ps1"
    > "%PS1%" (
    echo $out = "%MSINFO_TXT%"
    echo $timeout = %MSINFO_TIMEOUT%
    echo $p = Start-Process -FilePath "msinfo32.exe" -ArgumentList "/report",$out -PassThru
    echo $sw = [Diagnostics.Stopwatch]::StartNew()
    echo while(-not (Test-Path $out) -and $sw.Elapsed.TotalSeconds -lt $timeout) {
    echo Write-Host -NoNewline "."
    echo Start-Sleep -Seconds 1
    echo }
    echo Write-Host ""
    echo if(Test-Path $out) {
    echo Write-Output "--- start msinfo32 report ---"
    echo Get-Content -Path $out ^| Select-String -Pattern "^(System Model|System Manufacturer|BIOS Version|BIOS Date|OS Name|OS Version|System Type|Total Physical Memory|Available Physical Memory)" -SimpleMatch
    echo Write-Output "--- end msinfo32 report ---"
    echo } else {
    echo Write-Output ("msinfo32 timed out after " + $timeout + " seconds; killing msinfo32 and showing compact WMI fallback")
    echo try { Stop-Process -Id $p.Id -Force -ErrorAction SilentlyContinue } catch {}
    echo $f = Get-CimInstance Win32_ComputerSystem
    echo $b = Get-CimInstance Win32_BIOS
    echo Write-Output ("System Manufacturer: " + $f.Manufacturer)
    echo Write-Output ("System Model: " + $f.Model)
    echo Write-Output ("System Type: " + $f.SystemType)
    echo Write-Output ("Total Physical Memory: " + ([math]::Round($f.TotalPhysicalMemory/1MB)) + " MB")
    echo Write-Output ("BIOS Version: " + $b.SMBIOSBIOSVersion)
    echo Write-Output ("BIOS Date: " + $b.ReleaseDate)
    echo }
    )

    :: run the temporary PowerShell script
    powershell -NoProfile -ExecutionPolicy Bypass -File "%PS1%"

    :: remove the temporary PowerShell script
    del "%PS1%" >nul 2>&1

    echo

    REM SECTION: PowerShell Get-ComputerInfo selected fields
    echo -- Get-ComputerInfo selected fields --
    powershell -NoProfile -Command ^
    " $ci = Get-ComputerInfo; ^
    $props = 'CsName','WindowsProductName','WindowsVersion','OsBuildNumber','OsArchitecture','OsHotFixes','CsManufacturer','CsModel','CsSystemType','BiosManufacturer','BiosVersion','BiosReleaseDate','CsProcessors','CsTotalPhysicalMemory'; ^
    foreach($p in $props) { if($ci.$p -ne $null) { Write-Output ($p + ': ' + ($ci.$p -join ', ')) } } " 2>nul || echo Get-ComputerInfo not available
    echo

    REM SECTION: Secure Boot and virtualization
    echo -- Secure Boot and virtualization --
    powershell -NoProfile -Command "if (Get-ItemProperty -Path HKLM:\\SYSTEM\\CurrentControlSet\\Control\\SecureBoot\\State -Name UEFISecureBootEnabled -ErrorAction SilentlyContinue) { Write-Output 'SecureBoot: Enabled' } else { Write-Output 'SecureBoot: Disabled or not supported' }" 2>nul || echo SecureBoot check not available
    powershell -NoProfile -Command "Get-CimInstance Win32_ComputerSystem | Select-Object -Property HypervisorPresent,TotalPhysicalMemory" 2>nul || echo virtualization info not available
    echo

    REM SECTION: important environment variables
    echo USERNAME = %USERNAME%
    echo USERDOMAIN = %USERDOMAIN%
    echo COMPUTERNAME = %COMPUTERNAME%
    echo HOMEDRIVE = %HOMEDRIVE%
    echo HOMEPATH = %HOMEPATH%
    echo USERPROFILE = %USERPROFILE%
    echo LOCALAPPDATA = %LOCALAPPDATA%
    echo PROGRAMFILES = %PROGRAMFILES%
    echo PROGRAMFILES(X86) = %PROGRAMFILES(X86)%
    echo PROGRAMDATA = %PROGRAMDATA%
    echo PATH = %PATH%
    echo

    REM SECTION: script context and permissions
    echo current directory = %CD%
    echo script fullpath = %~f0
    echo script drive = %~d0
    echo script folder = %~dp0
    echo args = %*
    icacls "%LOGDIR%" 2>nul || echo icacls unavailable
    echo

    REM SECTION: final notes and guidance for readers
    echo -- Notes --
    echo 1) This script writes the final log as UTF-8 without BOM so modern tools can parse it.
    echo 2) Save this batch file ANSI or UTF-8 without BOM to avoid BOM artifacts in cmd display.
    echo 3) msinfo32 may take up to %MSINFO_TIMEOUT% seconds; the script shows a dot spinner and falls back to a WMI summary if timed out.
    echo 4) TARGET_HTTP and TARGET_PING are configurable at the top of this file.
    echo 5) If you attach the produced log, include the first 30 lines and any error sections.
    echo
    echo Please attach the produced log file sysinfo%LOGSTAMP%.log when asking for help.
    echo ==============================================
    exit /b

    Why write a batch when free Speccy will do the job and save info in a file ? --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Zaidy036@Zaidy036@air.isp.spam to alt.comp.os.windows-10,alt.comp.os.windows-11,alt.msdos.batch on Sat Sep 27 21:19:56 2025
    From Newsgroup: alt.msdos.batch

    On 9/27/2025 3:44 PM, Marion wrote:
    sysinfo.bat


    Why write a batch when free Speccy will do the job and save info in a file ? --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Marion@marionf@fact.com to alt.comp.os.windows-10,alt.comp.os.windows-11,alt.msdos.batch on Sun Sep 28 06:05:04 2025
    From Newsgroup: alt.msdos.batch

    Zaidy036 wrote:
    Why write a batch when free Speccy will do the job and save info in a file ?

    That's a rather apropos and quite valid question for you to ask of me. Especially since I didn't post the file in the context of how it's used.

    So I apologize for not providing a longer description of why it's useful.
    The two approaches are completely different. In almost every way they are.

    First off, while I've long ago installed Speccy for system output...
    <https://i.postimg.cc/bJgzBZDb/system.jpg> menu > hw > system > speccy

    Speccy performs checks & outputs that sysinfo.bat does doesn't and vice
    versa, where the command of the output & customization is not equivalent.

    The reason for the sysinfo.bat file is control.
    You control what it outputs.

    You control the script to output just what you need for any given task.

    It should be noted I automate everything, so when I'm setting up scripts to turn things on and off, I need to know if they're doing it correctly using sections of this file. Every time I run automation, I have to run checks afterward.

    For example, to set all the various registry keys for proxies, I run:
    Win+R > startproxy
    And to stop that proxy (& reset all the myriad things it sets) I run:
    Win+R > stopproxy
    But then I have to make sure everything is unset afterward, so I run:
    Win+R > checkproxy

    I do this scores of times a day for various programs like my automatic
    random timezone setter (thanks to Herbert) and my automatic VPN switcher (thanks to Marik Novotny) and my automatic dummy browser switcher, etc.

    If a sequence is 10 steps, I reduce it to 5, and then to 2 and then 1.

    Essentially what I do is write scripts like the following which incorporate much of what was in the all-encompassing sysinfo.bat file does for logging.

    @echo off
    REM C:\data\sys\batch\checkproxy.bat 20250916
    REM This is version 2.2
    REM Custom unified Windows proxy diagnostic tool
    REM v1.0 lists WinINET manual proxy, WinHTTP proxy, PAC/AutoDetect
    REM v1.1 replaces echo. with echo( to avoid command misinterpretation
    REM v1.2 adds PAC file existence check and SHA256 hash logging (114 lines)
    REM v1.3 (152 lines) adds debugging (section 9)
    REM v1.4 (161 lines) adds more debugging (section 10)
    REM v1.5 (182 lines) adds more debugging (section 11)
    REM v1.6 (204 lines) adds command reference (section 12)
    REM v1.7 (205 lines) Added example.com which is reserved for demos/tests.
    REM v1.8 (217 lines) Added check for freegate proxy in addition to psiphon
    REM v1.9 (231 lines) Added output in final report to add freegate logging
    REM v2.0 (271 lines) adds timestamped log (checkproxyYYYYMMDD_HHMMSS.log)
    REM v2.1 (285 lines) parameterized HTTP port for freegate 8580 & psiphon 3736
    REM v2.2 (299 lines) parameterized all the proxy ports throughout
    REM Comment linelength limit ==================================================
    REM 567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 12
    :: Normally the pac file is served by a web server.
    :: This script doesn't rely on Windows successfully fetching the PAC file
    :: via HTTP. Instead, it Sets the registry key to point to the PAC URL
    :: It assumes the PAC logic is known & trusted.
    :: It uses proxy.cmd to apply proxy settings directly,
    :: bypassing the need for Windows to interpret the PAC file
    :: So even if http://127.0.0.1/proxy.pac isnot actually being served
    :: by a web server, the system still behaves as if it is because the
    :: tooling here enforces the logic manually.
    :: This is the where Windows typically looks for the PAC script URL.
    :: HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\
    :: AutoConfigURL = http://127.0.0.1/proxy.pac
    :: That tells Windows to fetch the PAC file from your own machine via HTTP
    :: http://127.0.0.1/proxy.pac
    :: C:\data\sys\batch\proxy.pac
    :: curl http://127.0.0.1/proxy.pac
    ::
    :: You could point to the actual pac file but that's less universal
    :: AutoConfigURL = file:///C:/data/sys/batch/proxy.pac
    ::
    :: C:\app\network\psiphon\psiphon3.exe -mode=socks
    :: Win+I > Settings > Network & Internet > Proxy > Manual proxy setup = on
    :: Automatic proxy setup
    :: Automatically detect settings = on
    :: Use setup script = on
    :: Script address = http://127.0.0.1/proxy.pac
    :: Manual proxy setup
    :: Use a proxy server = on
    :: Address http=127.0.0.1:3736;https=127.0.0.1:3736;socks=127.0.0.1:1080
    :: Port = <blank>
    :: Use the proxy server except for addresses that start with the following entries. Use semicolons (;) to separate entries.
    :: 10.*;172.16.*;172.17.*;172.18.*;172.19.*;172.20.*;172.21.*;172.22.*;172.23.*;172.24.*;172.25.*;172.26.*;172.27.*;172.28.*;172.29.*;172.30.*;172.31.*;192.168.*;169.254.*;[fc*];[fd*];[fe8*];[fe9*];[fea*];[feb*]
    :: [x]Don't use the proxy server for local (intranet) addresses
    ::
    :: HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\AutoConfigURL
    :: AutoConfigURL = http://127.0.0.1/proxy.pac
    ::
    :: C:\data\sys\batch\proxy.pac
    ::
    :: Final Result
    :: WinINET: Enabled and pointing to Psiphon
    :: WinHTTP: Synced to match WinINET
    :: PAC: Registry keys set, logic assumed, Auto-Detect enabled
    :: The system is now fully aligned across all proxy layers.
    ::
    REM BELOW is the log wrapper (console output saved to a timestamped file) v2p0
    set "LOGDIR=C:\data\sys\log"

    if "%1"=="__LOGGING__" goto :run_script

    for /f "tokens=1-4 delims=/ " %%a in ("%DATE%") do (
    set DOW=%%a
    set MM=%%b
    set DD=%%c
    set YYYY=%%d
    )
    for /f "tokens=1-3 delims=:." %%a in ("%TIME%") do (
    set HH=%%a
    set Min=%%b
    set Sec=%%c
    )
    if "%HH:~0,1%"==" " set HH=0%HH:~1,1%

    set LOGSTAMP=%YYYY%%MM%%DD%_%HH%%Min%%Sec%
    set "LOGFILE=%LOGDIR%\checkproxy%LOGSTAMP%.log"
    set "TMPTXT=%LOGDIR%\checkproxy%LOGSTAMP%.tmp"

    if not exist "%LOGDIR%" md "%LOGDIR%" 2>nul

    powershell -NoProfile -Command ^
    " & { & cmd /c '\"%~f0\" __LOGGING__' 2>&1 | Tee-Object -FilePath '%TMPTXT%' }"

    powershell -NoProfile -Command ^
    " [System.IO.File]::WriteAllText('%LOGFILE%', (Get-Content -Raw -LiteralPath '%TMPTXT%'), (New-Object System.Text.UTF8Encoding($false))); Remove-Item -LiteralPath '%TMPTXT%' -ErrorAction SilentlyContinue"

    echo(
    echo Log created at %LOGFILE%
    echo(
    pause
    exit /b

    :run_script
    REM ABOVE is the log wrapper (console output saved to a timestamped file) v2p0

    set FREEGATE_HTTP_PORT=8580
    set FREEGATE_HTTP_PORT_ALT=8581
    set PSIPHON_HTTP_PORT=3736
    set PSIPHON_SOCKS_PORT=1080

    echo [%DATE% %TIME%] Starting proxy check...

    setlocal

    set KEY="HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings"
    set PACFILE=C:\data\sys\batch\proxy.pac
    REM v2.0 Replace the HTTP proxy port with a parameterized port
    echo ==============================================
    echo WINDOWS PROXY CONFIGURATION CHECK
    echo ==============================================

    REM --- PAC file existence check ---
    if not exist "%PACFILE%" (
    echo WARNING: PAC file not found at %PACFILE%
    ) else (
    echo PAC file found at %PACFILE%
    echo PAC file SHA256 hash:
    certutil -hashfile "%PACFILE%" SHA256
    )

    REM --- WinINET (manual proxy) ---
    echo(
    echo [1] WinINET / Internet Settings
    for /f "tokens=2,* skip=2" %%A in ('reg query %KEY% /v ProxyEnable 2^>nul') do set ProxyEnable=%%B
    for /f "tokens=2,* skip=2" %%A in ('reg query %KEY% /v ProxyServer 2^>nul') do set ProxyServer=%%B
    if "%ProxyEnable%"=="0x1" (
    echo Proxy is ENABLED
    echo Proxy server: %ProxyServer%
    ) else (
    echo Proxy is DISABLED
    )

    REM --- WinHTTP proxy ---
    echo(
    echo [2] WinHTTP proxy (system/background services)
    netsh winhttp show proxy

    REM --- PAC (Proxy Auto-Config) & AutoDetect ---
    echo(
    echo [3] PAC / AutoDetect
    for /f "tokens=2,* skip=2" %%A in ('reg query %KEY% /v AutoConfigURL 2^>nul') do set PACurl=%%B
    for /f "tokens=2,* skip=2" %%A in ('reg query %KEY% /v AutoDetect 2^>nul') do set AutoDetect=%%B

    if defined PACurl (
    echo PAC script set: %PACurl%
    ) else (
    echo No PAC script URL found.
    )

    if "%AutoDetect%"=="0x1" (
    echo Auto-detect is ENABLED
    ) else (
    echo Auto-detect is DISABLED
    )


    REM Added these debugging commands (v1p3)
    echo(
    echo [4] Psiphon and Mongoose process check
    echo tasklist | findstr /i "psiphon3.exe mongoose.exe"
    tasklist | findstr /i "psiphon3.exe mongoose.exe"

    :: Added this insert to check for freegate proxy (v1p8)
    echo(
    echo [4b] Freegate process check
    tasklist | findstr /i "fg790p.exe"

    echo(
    echo [5b] Freegate port binding check
    REM netstat -ano | findstr :8580
    netstat -ano | findstr :%FREEGATE_HTTP_PORT%
    REM netstat -ano | findstr :8581
    netstat -ano | findstr :%FREEGATE_HTTP_PORT_ALT%
    :: END INSERT to check for freegate proxy (v1p8)

    echo(
    echo [5] Port binding check (Mongoose/Proxy)
    echo netstat -ano | findstr :8080
    netstat -ano | findstr :8080

    echo(
    echo [6] DNS resolution test
    echo nslookup example.com
    REM nslookup example.com
    REM v2.1 suppressed stderr
    nslookup example.com 2>nul

    echo(
    echo [7] Internet connectivity test
    echo ping 8.8.8.8
    ping 8.8.8.8

    REM Using %PROXY_PORT% set to Freegate (8580) & then to Psiphon (3736)
    echo(
    echo [8] Proxy test via curl (Freegate and Psiphon)

    REM --- Freegate test (8580) ---
    REM set PROXY_PORT=8580
    set PROXY_PORT=%FREEGATE_HTTP_PORT%
    echo -- Freegate on port %PROXY_PORT% --
    echo curl -x http://127.0.0.1:%PROXY_PORT% http://example.com --max-time 5
    curl -x http://127.0.0.1:%PROXY_PORT% http://example.com --max-time 5

    REM --- Psiphon test (3736) ---
    REM set PROXY_PORT=3736
    set PROXY_PORT=%PSIPHON_HTTP_PORT%
    REM echo -- Psiphon on port %PROXY_PORT% --
    echo curl -x http://127.0.0.1:%PROXY_PORT% http://example.com --max-time 5
    curl -x http://127.0.0.1:%PROXY_PORT% http://example.com --max-time 5

    echo(
    echo [9] .NET proxy settings (PowerShell)
    echo powershell -Command "[System.Net.WebRequest]::DefaultWebProxy"
    powershell -Command "[System.Net.WebRequest]::DefaultWebProxy"

    echo(
    echo [10] Network adapter configuration
    echo ipconfig /all
    ipconfig /all

    echo(
    echo [11] Network interface and routing diagnostics

    echo netsh interface show interface
    netsh interface show interface

    echo(
    echo route print
    route print

    echo(
    echo curl --verbose http://example.com
    curl --verbose http://example.com

    REM Optional deeper trace (creates trace.txt in current folder)
    echo(
    echo curl --trace trace.txt http://example.com
    curl --trace trace.txt http://example.com


    echo(
    echo Summary:
    echo Proxy Enabled: %ProxyEnable%
    echo Proxy Server: %ProxyServer%
    echo PAC URL: %PACurl%
    echo AutoDetect: %AutoDetect%

    echo(
    echo ==============================================
    echo Check complete.
    echo ==============================================

    echo(
    echo [12] Command Reference (manual run options)
    echo certutil -hashfile "C:\data\sys\batch\proxy.pac" SHA256
    echo reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable
    echo reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer
    echo netsh winhttp show proxy
    echo reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v AutoConfigURL
    echo reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v AutoDetect
    echo tasklist | findstr /i "psiphon3.exe mongoose.exe"
    echo netstat -ano | findstr :8080
    echo nslookup example.com
    echo ping 8.8.8.8
    REM echo curl -x http://127.0.0.1:3736 http://example.com --max-time 5
    echo psiphon http port
    echo curl -x http://127.0.0.1:%PSIPHON_HTTP_PORT% http://example.com --max-time 5
    echo freegate http port
    echo curl -x http://127.0.0.1:%FREEGATE_HTTP_PORT% http://example.com --max-time 5
    echo powershell -Command "[System.Net.WebRequest]::DefaultWebProxy"
    echo ipconfig /all
    echo netsh interface show interface
    echo route print
    echo curl --verbose http://example.com
    echo curl --trace trace.txt http://example.com
    echo(
    echo Freegate process check:
    tasklist | findstr /i "fg790p.exe" || echo No Freegate process found.
    echo(
    echo Freegate port check:
    REM netstat -ano | findstr :8580 || echo No listener on 8580
    REM netstat -ano | findstr :8581 || echo No listener on 8581
    netstat -ano | findstr :%FREEGATE_HTTP_PORT% || echo No listener on %FREEGATE_HTTP_PORT%
    netstat -ano | findstr :%FREEGATE_HTTP_PORT_ALT% || echo No listener on %FREEGATE_HTTP_PORT_ALT%
    REM Sometimes Freegate sets ProxyServer to 127.0.0.1:8590 in
    REM Internet Options while actually listening on 8580 so check for that
    echo(
    echo ProxyServer registry value: %ProxyServer%
    REM echo Expected Freegate listener: 127.0.0.1:8580
    echo Expected Psiphon listener: 127.0.0.1:%PSIPHON_HTTP_PORT%
    echo Expected Freegate listener: 127.0.0.1:%FREEGATE_HTTP_PORT%
    endlocal
    --
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Alan K.@alan@invalid.com to alt.comp.os.windows-10,alt.comp.os.windows-11,alt.msdos.batch on Sun Sep 28 14:29:32 2025
    From Newsgroup: alt.msdos.batch

    On 9/27/25 8:36 PM, Hank Rogers wrote:
    Marion wrote on 9/27/2025 2:44 PM:
    sysinfo.bat
    Outputs desired system information to console & to a timestamped log file. >>
    This sysinfo.bat file outputs on my system everything I can think of
    that doesn't require elevation. What's missing that you would want?

    @echo off
    REM Purpose: Outputs system information
    REM sysinfo.bat (version 1.0 20250922) output system information
    REM sysinfo.bat (version 1.1 20250923) added msinfo32 wrapper
    REM sysinfo.bat (version 1.2 20250924) added hotfixes & installed programs,
    REM firewall, winrm, secureboot, driver checks & write test >> REM sysinfo.bat (version 1.3 20250925) added driverquery, secureboot
    REM virtualization checks & directory existence/writability checks
    REM sysinfo.bat (version 1.4 20250927) commented out WinRM checks
    REM as they required elevated permissions. Kept all else.
    REM Usage: double-click, Win+R, or run from cmd.
    REM Outputs timestamped log (e.g., C:\data\sys\log\sysinfo20250927_123456.log)
    REM Comment linelength limit ===================================================
    :: CONFIGURATION
    set MSINFO_TIMEOUT=60 REM seconds to wait for msinfo32 before fallback >> set TARGET_HTTP=example.com
    set TARGET_PING=8.8.8.8
    set "LOGDIR=C:\data\sys\log" REM change if you prefer another directory >>
    if "%1"=="__LOGGING__" goto :run_script

    :: build timestamp (locale-safe for Windows 10)
    for /f "tokens=1-4 delims=/ " %%a in ("%DATE%") do (
    set DOW=%%a
    set MM=%%b
    set DD=%%c
    set YYYY=%%d
    )
    for /f "tokens=1-3 delims=:." %%a in ("%TIME%") do (
    set HH=%%a
    set Min=%%b
    set Sec=%%c
    )
    if "%HH:~0,1%"==" " set HH=0%HH:~1,1%

    set LOGSTAMP=%YYYY%%MM%%DD%_%HH%%Min%%Sec%
    set "LOGFILE=%LOGDIR%\sysinfo%LOGSTAMP%.log"
    set "TMPTXT=%LOGDIR%\sysinfo%LOGSTAMP%.tmp"

    :: Ensure required directories exist (creates LOGDIR and parents if needed)
    if not exist "%LOGDIR%" (
    md "%LOGDIR%" 2>nul
    if errorlevel 1 echo WARNING: failed to create %LOGDIR%
    )

    :: Stream the second invocation live; Tee-Object writes an intermediate text file
    powershell -NoProfile -Command ^
    " & { & cmd /c '\"%~f0\" __LOGGING__' 2>&1 | Tee-Object -FilePath '%TMPTXT%' }"

    :: Convert intermediate file to UTF-8 without BOM and remove temp
    powershell -NoProfile -Command ^
    " [System.IO.File]::WriteAllText('%LOGFILE%', (Get-Content -Raw -LiteralPath '%TMPTXT%'), (New-Object System.Text.UTF8Encoding($false))); Remove-Item -LiteralPath '%TMPTXT%' -ErrorAction SilentlyContinue"

    echo.
    echo Log created at %LOGFILE%
    echo.
    pause
    exit /b

    :run_script
    echo [%DATE% %TIME%] sysinfo starting...
    echo ==============================================

    REM SECTION: invocation and basic info
    echo script = %~f0
    echo args = %*
    echo COMSPEC = %COMSPEC%
    echo current user = %USERNAME%\%USERDOMAIN%
    echo user profile = %USERPROFILE%
    echo local appdata = %LOCALAPPDATA%
    echo temp = %TEMP%
    echo

    REM SECTION: ensure directories needed and test writability
    REM Ensure the log directory exists and is writable by this user
    echo -- Directory checks --
    echo LOGDIR = %LOGDIR%
    if exist "%LOGDIR%" ( echo LOGDIR exists ) else ( echo LOGDIR missing ) >> echo -- test write access to LOGDIR --
    > "%LOGDIR%\._sysinfo_dir_test" echo OK 2>nul || echo write test failed for %LOGDIR%
    if exist "%LOGDIR%\._sysinfo_dir_test" del "%LOGDIR%\._sysinfo_dir_test" >nul 2>nul
    echo REM If the write test fails, logs may not be saved.
    echo

    REM SECTION: OS and system info
    echo -- OS basic --
    ver
    systeminfo | findstr /B /C:"OS Name" /C:"OS Version" /C:"System Boot Time" 2>nul || systeminfo | findstr /I "OS" 2>nul
    echo

    REM SECTION: Powershell and path
    echo -- PowerShell and execution policy --
    where powershell 2>nul || echo powershell NOTFOUND
    powershell -NoProfile -Command "$PSVersionTable.PSVersion; Get-ExecutionPolicy -List" 2>nul || echo PowerShell info not available
    echo

    REM SECTION: environment and PATH
    echo -- Environment variables --
    echo PATH = %PATH%
    echo PROGRAMFILES = %PROGRAMFILES%
    echo PROGRAMFILES(X86) = %PROGRAMFILES(X86)%
    echo PROGRAMDATA = %PROGRAMDATA%
    echo TEMP = %TEMP%
    echo

    REM SECTION: filesystem and free space
    echo -- Filesystem free space --
    wmic logicaldisk get name,freespace,filesystem 2>nul
    echo

    REM SECTION: code page and locale
    echo -- Code page and locale --
    chcp
    powershell -NoProfile -Command "[System.Globalization.CultureInfo]::InstalledUICulture.DisplayName" 2>nul
    echo

    REM SECTION: networking basics
    echo -- Networking: adapters, routes, listeners --
    ipconfig /all
    echo ------------------------
    route print
    echo ------------------------
    netstat -ano
    echo ------------------------
    echo -- DNS/HTTP check --
    nslookup %TARGET_HTTP%
    echo ------------------------
    ping -n 4 %TARGET_PING%
    echo

    REM SECTION: proxy and WinHTTP settings
    echo -- Proxy and WinHTTP --
    reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable 2>nul
    reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer 2>nul
    reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v AutoConfigURL 2>nul
    reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v AutoDetect 2>nul
    echo netsh winhttp show proxy
    netsh winhttp show proxy
    echo

    REM SECTION: installed tools and versions
    echo -- Installed tools (where/versions if present) --
    where curl 2>nul || echo curl NOTFOUND
    where git 2>nul || echo git NOTFOUND
    where python 2>nul || echo python NOTFOUND
    where node 2>nul || echo node NOTFOUND
    where gvim 2>nul || echo gvim NOTFOUND
    echo
    where curl 2>nul && curl -s --version 2>nul || echo curl version unknown >> echo

    REM SECTION: installed hotfixes and programs
    echo -- Installed hotfixes (quick list) --
    wmic qfe get HotFixID,InstalledOn 2>nul || echo qfe list not available
    echo
    echo -- Installed programs (registry uninstall keys, compact) --
    reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" /s /v DisplayName 2>nul | findstr /I /C:"DisplayName" || echo no registry uninstall info
    echo

    REM SECTION: firewall and remote config
    echo -- Windows Firewall state --
    netsh advfirewall show allprofiles state 2>nul
    echo -- Firewall outbound block rules (summary) --
    netsh advfirewall firewall show rule name=all | findstr /I /C:"Block" 2>nul
    REM -- WinRM / Remote Management --
    REM WinRM checks commented out per user request; enabling WinRM requires admin actions and firewall changes
    REM winrm quickconfig 2>nul
    echo

    REM SECTION: services and scheduled tasks (summary)
    echo -- Services summary --
    sc query state= all | findstr /I /C:"SERVICE_NAME" /C:"DISPLAY_NAME" 2>nul
    echo -- Scheduled tasks (verbose list) --
    schtasks /query /fo LIST /v 2>nul
    echo

    REM SECTION: user rights and elevation
    echo -- User rights --
    whoami /groups
    net session >nul 2>&1 && echo ELEVATED || echo NOT_ELEVATED
    echo

    REM SECTION: PATH search sample
    echo -- PATH search sample --
    where cmd 2>nul
    where powershell 2>nul
    where curl 2>nul
    echo

    REM SECTION: driver summary
    echo -- Driver query (brief) --
    driverquery /fo table /v 2>nul | findstr /I /C:"Driver" /C:"State" || echo driverquery not available
    echo

    REM ---------- msinfo32 with spinner and timeout using temporary PS script ----------
    echo SECTION: msinfo32 brief report (may take a while)
    set "MSINFO_TXT=%TEMP%\msinfo_report.txt"
    if exist "%MSINFO_TXT%" del "%MSINFO_TXT%" >nul 2>&1

    echo Running msinfo32 (may take up to %MSINFO_TIMEOUT% seconds)... please wait

    :: create temporary PowerShell script (ASCII-safe)
    set "PS1=%TEMP%\diag_msinfo_wrapper.ps1"
    > "%PS1%" (
    echo $out = "%MSINFO_TXT%"
    echo $timeout = %MSINFO_TIMEOUT%
    echo $p = Start-Process -FilePath "msinfo32.exe" -ArgumentList "/report",$out -PassThru
    echo $sw = [Diagnostics.Stopwatch]::StartNew()
    echo while(-not (Test-Path $out) -and $sw.Elapsed.TotalSeconds -lt $timeout) {
    echo Write-Host -NoNewline "."
    echo Start-Sleep -Seconds 1
    echo }
    echo Write-Host ""
    echo if(Test-Path $out) {
    echo Write-Output "--- start msinfo32 report ---"
    echo Get-Content -Path $out ^| Select-String -Pattern "^(System Model|System Manufacturer|BIOS Version|BIOS Date|OS Name|OS Version|System Type|Total Physical Memory|Available Physical Memory)" -SimpleMatch
    echo Write-Output "--- end msinfo32 report ---"
    echo } else {
    echo Write-Output ("msinfo32 timed out after " + $timeout + " seconds; killing msinfo32 and showing compact WMI fallback")
    echo try { Stop-Process -Id $p.Id -Force -ErrorAction SilentlyContinue } catch {}
    echo $f = Get-CimInstance Win32_ComputerSystem
    echo $b = Get-CimInstance Win32_BIOS
    echo Write-Output ("System Manufacturer: " + $f.Manufacturer)
    echo Write-Output ("System Model: " + $f.Model)
    echo Write-Output ("System Type: " + $f.SystemType)
    echo Write-Output ("Total Physical Memory: " + ([math]::Round($f.TotalPhysicalMemory/1MB)) + " MB")
    echo Write-Output ("BIOS Version: " + $b.SMBIOSBIOSVersion)
    echo Write-Output ("BIOS Date: " + $b.ReleaseDate)
    echo }
    )

    :: run the temporary PowerShell script
    powershell -NoProfile -ExecutionPolicy Bypass -File "%PS1%"

    :: remove the temporary PowerShell script
    del "%PS1%" >nul 2>&1

    echo

    REM SECTION: PowerShell Get-ComputerInfo selected fields
    echo -- Get-ComputerInfo selected fields --
    powershell -NoProfile -Command ^
    " $ci = Get-ComputerInfo; ^
    $props = 'CsName','WindowsProductName','WindowsVersion','OsBuildNumber','OsArchitecture','OsHotFixes','CsManufacturer','CsModel','CsSystemType','BiosManufacturer','BiosVersion','BiosReleaseDate','CsProcessors','CsTotalPhysicalMemory'; ^
    foreach($p in $props) { if($ci.$p -ne $null) { Write-Output ($p + ': ' + ($ci.$p -join ', ')) } } " 2>nul || echo Get-ComputerInfo not available
    echo

    REM SECTION: Secure Boot and virtualization
    echo -- Secure Boot and virtualization --
    powershell -NoProfile -Command "if (Get-ItemProperty -Path HKLM:\\SYSTEM\\CurrentControlSet\\Control\\SecureBoot\\State -Name UEFISecureBootEnabled -ErrorAction SilentlyContinue) { Write-Output 'SecureBoot: Enabled' } else { Write-Output 'SecureBoot: Disabled or not supported' }" 2>nul || echo SecureBoot check not available
    powershell -NoProfile -Command "Get-CimInstance Win32_ComputerSystem | Select-Object -Property HypervisorPresent,TotalPhysicalMemory" 2>nul || echo virtualization info not available
    echo

    REM SECTION: important environment variables
    echo USERNAME = %USERNAME%
    echo USERDOMAIN = %USERDOMAIN%
    echo COMPUTERNAME = %COMPUTERNAME%
    echo HOMEDRIVE = %HOMEDRIVE%
    echo HOMEPATH = %HOMEPATH%
    echo USERPROFILE = %USERPROFILE%
    echo LOCALAPPDATA = %LOCALAPPDATA%
    echo PROGRAMFILES = %PROGRAMFILES%
    echo PROGRAMFILES(X86) = %PROGRAMFILES(X86)%
    echo PROGRAMDATA = %PROGRAMDATA%
    echo PATH = %PATH%
    echo

    REM SECTION: script context and permissions
    echo current directory = %CD%
    echo script fullpath = %~f0
    echo script drive = %~d0
    echo script folder = %~dp0
    echo args = %*
    icacls "%LOGDIR%" 2>nul || echo icacls unavailable
    echo

    REM SECTION: final notes and guidance for readers
    echo -- Notes --
    echo 1) This script writes the final log as UTF-8 without BOM so modern tools can parse it.
    echo 2) Save this batch file ANSI or UTF-8 without BOM to avoid BOM artifacts in cmd display.
    echo 3) msinfo32 may take up to %MSINFO_TIMEOUT% seconds; the script shows a dot spinner and falls back to a WMI summary if timed out.
    echo 4) TARGET_HTTP and TARGET_PING are configurable at the top of this file.
    echo 5) If you attach the produced log, include the first 30 lines and any error sections.
    echo
    echo Please attach the produced log file sysinfo%LOGSTAMP%.log when asking for help.
    echo ==============================================
    exit /b



    I dunno man, but there sure are a lot of echoes in there :)

    It's a bit wordy. To see the info I have to scroll forever. I guess I could pipe it to
    more.
    --
    Linux Mint 22.2, Thunderbird 128.14.0esr, Mozilla Firefox 143.0.1
    Alan K.
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Marion@marionf@fact.com to alt.comp.os.windows-10,alt.comp.os.windows-11,alt.msdos.batch on Sun Sep 28 20:07:33 2025
    From Newsgroup: alt.msdos.batch

    Alan K. wrote:
    I dunno man, but there sure are a lot of echoes in there :)

    It's a bit wordy. To see the info I have to scroll forever. I guess I could pipe it to
    more.

    Heh heh heh, I get the humor, so first I'll say it's fair enough.

    My scripts do like to describe what each section does & why it does it.

    But hey, if the biggest flaw you can find after looking through the source
    code is that it's too well documented, I'll take that as a compliment.

    After all, scrolling is effortless but debugging cryptic, uncommented batch files is a lot of effort. With that in mind, let me know what useful
    debugging commands we need to add in order to make this script even more
    useful to more people than it is at the moment (as it was written for me).

    Thanks!
    --- Synchronet 3.21a-Linux NewsLink 1.2