Guest User

Create Batch File to Open Screen Copy Directly

a guest
Oct 15th, 2024
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 0.62 KB | None | 0 0
  1. @echo off
  2. :: Check for administrative permissions
  3. >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
  4. if '%errorlevel%' NEQ '0' (
  5.     echo Requesting administrative privileges...
  6.     powershell -Command "Start-Process cmd -ArgumentList '/c %~s0' -Verb RunAs"
  7.     exit /B
  8. )
  9. :: Change directory to Scrcpy installation folder
  10. cd "C:\Program Files\Scrcpy"
  11. :: Run scrcpy
  12. scrcpy
  13. pause
  14.  
  15.  
  16. :: Don’t forget to change "C:\Program Files\Scrcpy" to your Scrcpy folder path.
  17. :: And if you have already added the Scrcpy folder path to the system environment variables, you can remove the CD line.
Advertisement
Add Comment
Please, Sign In to add comment