drykrot.blogg.se

Windows 10 resource kit batch file commands
Windows 10 resource kit batch file commands








  1. WINDOWS 10 RESOURCE KIT BATCH FILE COMMANDS HOW TO
  2. WINDOWS 10 RESOURCE KIT BATCH FILE COMMANDS CODE

It makes it kinda hard to read the codelines that stretch across (another reason to do this at home with notepad++).

WINDOWS 10 RESOURCE KIT BATCH FILE COMMANDS CODE

I am kinda surprised this forum doesn't stretch the code boxes to a wider width.

WINDOWS 10 RESOURCE KIT BATCH FILE COMMANDS HOW TO

And it looks like this will also allow me to learn how to do functions in batch. (One of the benefits of bash, you can have it output the date in whatever format you want.)Īs it stands right now, I will probably leave the script as is, just so it is easy for people to modify for the new fiscal years and such, but I am trying to become more proficient at batch anyways, so I will probably dig through this and figure out how everything works. DD/MM/YYYY) I didn't look through it too much, but I would guess that it probably doesn't, due to the logistics of finding that information in the OS, which I assume isn't readily available in an environment variable. Out of curiosity, does your script take into account European style dates? (ie. And I believe the time is just based on military time. But you are correct, currently the script requires the date to be with MM/DD/YYYY at the end of the string. I will have to do it sometime when I am not trying to get out early (we have our Christmas Party tonight, and we are hoping to leave around lunch time). That is a lot for me to dig through so I can actually understand it. IF %_Hour% LSS 10 IF /I %_AMPM%=A Set _Hour=0%_Hour% :: Modified by TheOutcaste from SortTimeįor /F "TOKENS=*" %%A In ('TIME/T') Do Set _Time=%%Aįor /F "TOKENS=2*" %%A In ('REG QUERY "HKCU\Control Panel\International" /v iTime') Do Set _iTime=%%Bįor /F "TOKENS=2*" %%A In ('REG QUERY "HKCU\Control Panel\International" /v sTime') Do Set _sTime=%%Bįor /F "TOKENS=1* DELIMS=%_sTime% " %%A In ('Echo %_Time%') Do (Įcho.%_Minutes%| FIND /I "A" >NUL & Set _AMPM=AĮcho.%_Minutes%| FIND /I "P" >NUL & Set _AMPM=P :: Time is returned in 24 hour format as hhmm in variable HHMM If "%_fdate:~7,1%"="" For /F "Tokens=3 skip=3" %%I In ('reg query "HKCU\Control Panel\International\Calendars\TwoDigitYearMax" /V 1 2^>Nul') Do Set _TDYM=%%I :: Default Delimiter of TAB and Space are usedįor /F "TOKENS=2*" %%A In ('REG QUERY "HKCU\Control Panel\International" /v iDate') Do Set _iDate=%%Bįor /F "TOKENS=2*" %%A In ('REG QUERY "HKCU\Control Panel\International" /v sDate') Do Set _sDate=%%B :: If passed a parameter use that for the date :: Date is returned as yyyymmdd in variable _fdate :: to read the "International" settings from the registry. :: (already installed with WinXP and Vista) :: This batch file uses REG.EXE from the NT Resource Kit :: independent of "International" settings. :: This batch file will always display the same results, REM To remove the leading 0 on the day if it exists :: and converted to batch code by Ron Bakowski. :: provided by Doctor Fenton on the Math Forum :: algorithm from the Astronomical Almanac, :: Algorithm based on Fliegel-Van Flandern :: Modified to handle months and days without leading zeros

windows 10 resource kit batch file commands

:: Code taken from datediff.bat written by Rob van der Woude

windows 10 resource kit batch file commands

:: routine was corrected with help from Alexander Shapiro

windows 10 resource kit batch file commands

:: First strip leading zeroes a logical error in this :: Call :JDate %_GYear% %_GMonth% %_GDay%










Windows 10 resource kit batch file commands