dav1129 said:
hugo1111 said:
Hi mate,

your batch file is fantastic and is exactly the work around i was looking for. However, it fails to reset the current date automatically upon leaving and prompts me to enter it manually ...any idea Why ? i ve copied and pasted your code and saved it as a batch file. I am running XP 32, so i don t have any run as administrator option, although logged on as one.

thanks for your help
were you addressing me? if so, I started the thread because I needn't help myself. This is all a little beyond me although I did ultimately, get batch file together which worked. Trouble is I deleted the program because I want to upgrade it and never did. I'll see if I can find the batch file.......

Code:
ECHO OFF
CLS
:MENU
ECHO.
ECHO ....................................... ........
ECHO PRESS 1 to select your task, or 2 to EXIT.
ECHO ....................................... ........
ECHO.
ECHO 1 - Launch C:\ETKA\PROG1\Etka7.exe "C:\ETKA\PROG\ETKA_VW.INI"
ECHO 2 - Exit
ECHO.
SET /P M=Type 1, 2, then press ENTER:
IF %M%==1 GOTO PROGRAM
IF %M%==2 GOTO RESETDATE

:PROGRAM
FOR /F "TOKENS=1* DELIMS= " %%A IN ('DATE/T') DO SET CURDATE=%DATE%
COLOR 4f
echo Setting System date to 01-01-2012
echo.
date 01-01-2012
echo Launching Program........Please Wait
echo.
START /W C:\ETKA\PROG1\Etka7.exe "C:\ETKA\PROG\ETKA_VW.INI"
echo Resetting System Date back to Todays Date....Please Wait

date %CURDATE%
This batch file above worked for me. It reset the system date (to earlier one, which allowed my program to run without recent updates), and then start the program. The DOS command window stays open and when the desired program was closed, reset the system date.

I am not sure any more how I got this to work for me but if it works for you, great. Of course, you will have to swap the executable. If it doesn't work as is, you'll have to try some trial and error and learn a little DOS yourself.
I was looking for a way to run ETKA too, without needing to update it every time. So i found this writeup, it was very helpful. Thanks dav1129.
But, as Hugo1111 stated earlier, i was not able to get it return the original date back after shutting down ETKA.
So i started tinkering with the batch file, and i noticed that the %CURDATE% variable has the date with weekday in front, like this: "ke 4.11.2015".
So i edited the batch to remove the first three characters and now it works for me at least. I'm on windows 7 32-bit.
Here is what i did:
Code:
ECHO OFF
CLS
:MENU
ECHO.
ECHO ....................................... ........
ECHO PRESS 1 to select your task, or 2 to EXIT.
ECHO ....................................... ........
ECHO.
ECHO 1 - Launch E:\ETKA\VWAU\PROG1\Etka7.exe "E:\ETKA\VWAU\PROG\ETKA_VW.INI"
ECHO 2 - Exit
ECHO.
SET /P M=Type 1, 2, then press ENTER:
IF %M%==1 GOTO PROGRAM
IF %M%==2 GOTO RESETDATE

:PROGRAM
FOR /F "TOKENS=1* DELIMS= " %%A IN ('DATE/T') DO SET CURDATE=%DATE%
SET CLEANDATE=%CURDATE:* =%
COLOR 4f
echo Setting System date to 01-06-2015
echo.
date 01-06-2015
echo Launching Program........Please Wait
echo.

START /W E:\ETKA\VWAU\PROG1\Etka7.exe "E:\ETKA\VWAU\PROG\ETKA_VW.INI"
echo Resetting System Date back to Todays Date....Please Wait

date %CLEANDATE%
I also changed the paths, since i have ETKA 7.5. And date doesn't need to be set back so much (1.6.2015).