Rob van der Woude's Scripting Pages
Powered by GeSHi

Source code for sdate.bat

(view source code of sdate.bat as plain text)

  1. @ECHO OFF
  2. :: For REG.EXE 3.0 (Windows XP) and later versions
  3. FOR /F "tokens=3" %%A IN ('REG QUERY "HKEY_CURRENT_USER\Control Panel\International" /v sDate 2^>NUL') DO SET sDate=%%A
  4. :: For earlier REG.EXE versions
  5. FOR /F "tokens=3" %%A IN ('REG QUERY "HKEY_CURRENT_USER\Control Panel\International\sDate"    2^>NUL') DO SET sDate=%%A
  6. ECHO HKEY_CURRENT_USER\Control Panel\International\sDate=%sDate%

page last modified: 2023-03-10