Advertisement
UnitNVMe

D

Jan 3rd, 2025 (edited)
1,011
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 3.58 KB | None | 0 0
  1. @echo off
  2. chcp 65001 >nul
  3.  echo เครื่องต้องมีพื้นที่อย่างน้อย35GB!!!
  4. :: ตั้งรหัสผ่าน
  5. set "password=123"
  6.  
  7. :: ขอให้ผู้ใช้ป้อนรหัสผ่าน
  8. set /p "inputPassword=ใส่รหัสผ่าน: "
  9.  
  10. :: ตรวจสอบรหัสผ่าน
  11. if not "%inputPassword%"=="%password%" (
  12.     echo [ERROR] รหัสผ่านไม่ถูกต้อง! กรุณาติดต่อ https://web.facebook.com/chonlathan.nillerd/
  13.     pause
  14.     exit /b
  15. )
  16.  
  17. :: ตรวจสอบว่า D:\MorganGames_x64 มีอยู่หรือไม่
  18. if not exist "C:\MorganGames_x64" (
  19.     echo [ERROR] ไม่พบโฟลเดอร์ C:\MorganGames_x64 กรุณาติดต่อ https://web.facebook.com/chonlathan.nillerd/
  20.     pause
  21.     exit /b
  22. )
  23.  
  24. :: ตรวจสอบและสร้าง C:\Backup\def หากยังไม่มี
  25. if not exist "C:\Backup\def" (
  26.     echo สร้างโฟลเดอร์สำรอง: C:\Backup\def
  27.     mkdir "C:\Backup\def"
  28. )
  29.  
  30. :: ตรวจสอบว่ามีไฟล์ gta_sa.exe ใน C:\Backup\def หรือไม่
  31. if exist "C:\Backup\def\gta_sa.exe" (
  32.     echo พบไฟล์ gta_sa.exe ใน C:\Backup\def แล้ว ข้ามขั้นตอนการสำรองข้อมูล
  33. ) else (
  34.    :: สำรองไฟล์ทั้งหมดจาก C:\MorganGames_x64 ไปยัง C:\Backup\def
  35.     echo กำลังสำรองข้อมูลจาก C:\MorganGames_x64 ไปยัง C:\Backup\def...
  36.     xcopy "C:\MorganGames_x64\*" "C:\Backup\def" /E /H /C /I /Y
  37. )
  38.  
  39. :: ดาวน์โหลดไฟล์จากคลาวด์
  40. set "downloadUrl=https://drive.usercontent.google.com/download?id=1bpEZtn8Nrjub4kU5NhqM_dA1HARX8YLB&export=download&authuser=0&confirm=t&uuid=93e952dc-47ff-4791-a02e-4f0baf7aef92&at=AIrpjvMeqT_jmsU-7xo1fnm79iq-:1737179152655"
  41. set "downloadPath=%~dp0Ntxfile.zip"
  42. set "extractPath=%~dp0temp"
  43.  
  44. :: ตรวจสอบว่ามี curl หรือ wget
  45. where curl >nul 2>nul
  46. if %errorlevel%==0 (
  47.     echo กำลังดาวน์โหลดไฟล์ด้วย curl...
  48.     curl -o "%downloadPath%" "%downloadUrl%"
  49. ) else (
  50.     where wget >nul 2>nul
  51.     if %errorlevel%==0 (
  52.         echo กำลังดาวน์โหลดไฟล์ด้วย wget...
  53.         wget -O "%downloadPath%" "%downloadUrl%"
  54.     ) else (
  55.         echo [ERROR] ไม่พบ curl หรือ wget ในระบบ
  56.         pause
  57.         exit /b
  58.     )
  59. )
  60.  
  61. :: แตกไฟล์ zip
  62. powershell -Command "Expand-Archive -Path '%downloadPath%' -DestinationPath '%extractPath%' -Force"
  63.  
  64. :: คัดลอกโฟลเดอร์ Ntxfile ทั้งหมดไปยัง C:\MorganGames_x64
  65. xcopy "%temp%\temp\Ntxfile" "C:\MorganGames_x64\Ntxfile\" /E /H /C /I /Y
  66.  
  67. :: ย้ายเนื้อหาทั้งหมดจาก Ntxfile ไปยัง C:\MorganGames_x64
  68. xcopy "C:\MorganGames_x64\Ntxfile\*" "C:\MorganGames_x64\" /E /H /C /I /Y
  69. move /y "C:\MorganGames_x64\Ntxfile\*" "C:\MorganGames_x64\"
  70.  
  71. :: ลบโฟลเดอร์ Ntxfile ที่ว่างเปล่า
  72. rmdir /s /q "C:\MorganGames_x64\Ntxfile"
  73.  
  74. :: ลบไฟล์ temp หลังการใช้งาน
  75. rd /s /q "%extractPath%"
  76. del "%downloadPath%"
  77.  
  78. echo การดำเนินการเสร็จสมบูรณ์
  79. pause
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement