Advertisement
Guest User

fastscraper_debug.bat

a guest
Jan 26th, 2018
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. @echo off
  2. color 3f
  3. title fastscraper debug
  4.  
  5. :Test1 - Get OS's language
  6. echo Checking OS's language
  7. for /F "tokens=3" %%a in ('reg Query "HKCU\Control Panel\Desktop" /V PreferredUILanguages ^| find "PreferredUILanguages"') do set "language=%%a"
  8. echo PC lang: %language%
  9. echo.
  10.  
  11. :Test2 - Detect OS architecture
  12. echo Checking OS architecture
  13. reg Query "HKLM\Hardware\Description\System\CentralProcessor\0" | find /I "x86" >nul && set "arch=386" || set "arch=amd64"
  14. echo PC arch: %arch%
  15. echo.
  16.  
  17. :Test3 - Detect PowerShell installation (method 1)
  18. echo Checking for PowerShell installation (method 1)
  19. for %%i in (powershell.exe) do if "%%~$path:i"=="" (set "psInst=NOT ") else set "psInst="
  20. echo PowerShell is %psInst%installed!
  21.  
  22. :Test4 - Detect PowerShell installation (method 2)
  23. echo Checking for PowerShell installation (method 2)
  24. reg Query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1" | find /I "Install" >nul && set "psInst=" || set "psInst=NOT "
  25. echo PowerShell is %psInst%installed!
  26. for /F "tokens=3" %%a in ('reg Query "HKLM\SOFTWARE\Microsoft\PowerShell\1\PowerShellEngine" /v PowerShellVersion ^| find "PowerShellVersion"') do set "psVer=%%a"
  27. echo PowerShell Version %psVer%
  28. echo.
  29.  
  30. echo finished!
  31. pause>nul
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement