Advertisement
J2897

Create Time Config

Mar 3rd, 2025 (edited)
934
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 0.46 KB | None | 0 0
  1. @echo OFF
  2.  
  3. ::set "DRIVE=%USERPROFILE%" || REM For testing purposes
  4. set "DRIVE=D:" || REM The device's drive letter
  5. set "DELAY=3" || REM Seconds until the time is set via the device
  6.  
  7. powershell -command "$TIMESTAMP = (Get-Date).AddSeconds(%DELAY%).ToString('yyyyMMddHHmmss'); Write-Output $TIMESTAMP | Out-File '%DRIVE%\TM.txt'"
  8.  
  9. echo Time configuration file created at: %DRIVE%\TM.txt
  10. echo Please safely disconnect the device and check if the time is updated.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement