@echo off cls set SVRNAME= @title System Clock Labeler (by GuidoZ) echo. echo System Clock Labeler Utility - www.GuidoZ.com echo. echo This utility will put the computer name by the clock to help label servers echo and such during terminal server sessions. Use is simple! Just type the server echo name where prompted and hit enter. The end result will be the time, followed echo by the text you type surrounded by square brackets (with a space cushion). echo. echo --------------------------------------------------- echo WARNING - Explorer will be restarted automatically! echo Save all work before proceeding or close to cancel. echo --------------------------------------------------- echo. echo To restore the clock to its normal state, simply leave the label field below echo blank. (Just hit enter to continue.) Please enter the label you would like to SET /P SVRNAME= create and hit enter: if [%SVRNAME%]==[] goto RESET goto SVRREG :SVRREG echo. echo Labeling system... Done! if exist "%temp%\svrreg.reg" del "%temp%\svrreg.reg" echo REGEDIT4 >> "%temp%\svrreg.reg" echo. >> "%temp%\svrreg.reg" echo [HKEY_CURRENT_USER\Control Panel\International] >> "%temp%\svrreg.reg" echo "sTimeFormat"="h:mm:ss tt [ %SVRNAME% ]" >> "%temp%\svrreg.reg" echo. >> "%temp%\svrreg.reg" echo. >> "%temp%\svrreg.reg" regedit /s "%temp%\svrreg.reg" del "%temp%\svrreg.reg" goto DOIT :RESET echo. echo Resetting clock to default values... Done! if exist "%temp%\svrreg.reg" del "%temp%\svrreg.reg" echo REGEDIT4 >> "%temp%\svrreg.reg" echo. >> "%temp%\svrreg.reg" echo [HKEY_CURRENT_USER\Control Panel\International] >> "%temp%\svrreg.reg" echo "sTimeFormat"="h:mm:ss tt" >> "%temp%\svrreg.reg" echo. >> "%temp%\svrreg.reg" echo. >> "%temp%\svrreg.reg" regedit /s "%temp%\svrreg.reg" del "%temp%\svrreg.reg" goto DOIT :DOIT echo. echo Restarting Explorer to show changes, please wait... ping 127.0.0.1 -n 3 > nul start /wait taskkill /F /IM Explorer.exe ping 127.0.0.1 -n 2 > nul start explorer.exe goto DONE :DONE cls echo. echo System Clock Labeler Utility - www.GuidoZ.com echo. echo All work done! Check next to the clock for your system label. echo. echo ------------------------------------------------------------------------- echo NOTE - there is one known issue. If the text you type includes one of the echo default identifiers used by Windows, namely h, H, mm, ss, or tt it will echo display the corresponding value instead. There is no known workaround. echo ------------------------------------------------------------------------- echo. echo (Press any key to exit.) pause > nul exit