I have crated an application in vb .net and i want to make sure that all my users have their regional and lanugage settings set to english us (mm/dd/yyyy)- as we agreed with them.
i know how to do it manually.......but i want to run this batch file when installing the application
thanks
i found this - it changes your setting to mm//dd/yyyy but not English canada to english us
:: ShortDate_Save_Restore.bat
:: Process Steps:
:: 1 Save current shortDate format,
:: 2 Set format to Standard M/d/yyyy
:: 3 Execute passed parameters
:: 4 Restore original shortDate format
@SETLOCAL&@SETLOCAL ENABLEEXTENSIONS&@SETLOCAL ENABLEDELAYEDEXPANSION&@IF NOT DEFINED EchoState @SET EchoState=OFF
@ECHO %EchoState%
:: Display current format
REG.EXE QUERY "HKCU\Control Panel\International" /v sShortDate | FINDSTR.EXE /I sShortDate
DATE /T
:: Capture (and save) the current date format output from 'REG QUERY'
FOR /F "TOKENS=1,2*" %%A in ('REG.EXE QUERY "HKCU\Control Panel\International" /v sShortDate ^| FINDSTR.EXE /I sShortDate') DO (
SET _KEY=%%A
SET _TYPE=%%B
SET _VALUE=%%C
)
:: Reset the format to the system default value MM/dd/yyyy
REG.EXE ADD "HKCU\Control Panel\International" /f /v sShortDate /t REG_SZ /d MM/dd/yyyy
:: Verify that the value is set
REG.EXE QUERY "HKCU\Control Panel\International" /v sShortDate | FINDSTR.EXE /I sShortDate
DATE /T
pause
:: Run process
@ECHO.CALL %*
CALL %*
:: End process