Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- color 3f
- title fastscraper debug
- :Test1 - Get OS's language
- echo Checking OS's language
- for /F "tokens=3" %%a in ('reg Query "HKCU\Control Panel\Desktop" /V PreferredUILanguages ^| find "PreferredUILanguages"') do set "language=%%a"
- echo PC lang: %language%
- echo.
- :Test2 - Detect OS architecture
- echo Checking OS architecture
- reg Query "HKLM\Hardware\Description\System\CentralProcessor\0" | find /I "x86" >nul && set "arch=386" || set "arch=amd64"
- echo PC arch: %arch%
- echo.
- :Test3 - Detect PowerShell installation (method 1)
- echo Checking for PowerShell installation (method 1)
- for %%i in (powershell.exe) do if "%%~$path:i"=="" (set "psInst=NOT ") else set "psInst="
- echo PowerShell is %psInst%installed!
- :Test4 - Detect PowerShell installation (method 2)
- echo Checking for PowerShell installation (method 2)
- reg Query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1" | find /I "Install" >nul && set "psInst=" || set "psInst=NOT "
- echo PowerShell is %psInst%installed!
- for /F "tokens=3" %%a in ('reg Query "HKLM\SOFTWARE\Microsoft\PowerShell\1\PowerShellEngine" /v PowerShellVersion ^| find "PowerShellVersion"') do set "psVer=%%a"
- echo PowerShell Version %psVer%
- echo.
- echo finished!
- pause>nul
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement