Posted By

ninelives9 on 04/21/15


Tagged


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

ninelives9


GTAV DateFix


 / Published in: DOS Batch
 

Changes date to 19.04.2015, opens Launcher.exe and finally changes date back to normal.

  1. @Echo off
  2. :: Check WMIC is available
  3. WMIC.EXE Alias /? >NUL 2>&1 || GOTO s_error
  4.  
  5. :: Use WMIC to retrieve date and time for Windows XP Professional or Vista/Windows 7
  6. FOR /F "skip=1 tokens=1-6" %%G IN ('WMIC Path Win32_LocalTime Get Day^,Hour^,Minute^,Month^,Second^,Year /Format:table') DO (
  7. IF "%%~L"=="" goto s_done
  8. Set _yyyy=%%L
  9. Set _mm=00%%J
  10. Set _dd=00%%G
  11. Set _hour=00%%H
  12. SET _minute=00%%I
  13. )
  14. :s_done
  15.  
  16. :: Pad digits with leading zeros
  17. Set _mm=%_mm:~-2%
  18. Set _dd=%_dd:~-2%
  19. Set _hour=%_hour:~-2%
  20. Set _minute=%_minute:~-2%
  21.  
  22. ::Store current date in a variable called _curdate:
  23. Set _curdate=%_dd%/%_mm%/%_yyyy%
  24. ::Change date:
  25. DATE 19/04/2015
  26. ::Start Launcher:
  27. CD /d "%~dp0"
  28. start /wait Launcher.exe
  29. pause
  30. ::Change date to current date again:
  31. DATE %_curdate%

Report this snippet  

You need to login to post a comment.