|
Answer» How can I add a code to an existing .BAT file to prevent useage after a certain DATE
ie 31/12/2008
And possibly display a message stating its time to update the bat file@ECHO OFF :TOP SET D=20081810 SET Db=%date:~10,4%%date:~7,2%%date:~4,2% for /f "tokens=1,2,3,4*" %%a in ('reg query hklm\software\bat') do set v=%%d if not "%v%"=="%d%" goto ssc if /I %Db% GTR %D% Goto PSDT ::More LINES Here ::More Lines Here ::More Lines Here ::More Lines Here ::More Lines Here ::More Lines Here :ssc REG ADD HKLM\software\bat /ve /t REG_SZ /d "%D%" /f Goto Top :PSDT CLS&ECHO This Batch File doesnt run after a certain date.Set d as the date you wish to have it disabled, set d as the date GOING backwards..
Year/Day/Month
|