0

I am trying to make my Windows 8.1 system automatically take a screenshot every minute. This helps me with time tracking.

My current solution uses IrfanView. I wrote the following cmd batch file:

set IrfanView="C:\Program Files (x86)\IrfanView\i_view32.exe"
set DestDir=%~dp0.
set Cygwin=C:\cygwin64
REM see http://stackoverflow.com/questions/905226/mkdir-p-linux-windows
setlocal enableextensions

:loop

REM these for loops are really weird, but see SO
for /f "tokens=*" %%i in ('%Cygwin%\bin\date.exe +"%%y\%%m\%%d\%%H-%%M-%%S"') do set timestamp=%%i

set filename="%DestDir%\%timestamp%.png"
for %%F in (%filename%) do set dirname="%%~dpF"

if not exist %dirname% md %dirname%
%IrfanView% /ini="%~dp0" /capture=0 /convert=%filename%

%Cygwin%\bin\sleep.exe 60
goto :loop

and I put a copy of i_view32.ini in the target directory. Then I made a shortcut to the batch file and put it into the Windows 8.1 startup folder: shell:startup.

When I doubleclick the shortcut, the script starts and works fine. But it doesn't start automatically when I log in.

Why not?

The Event Log shows a BlueScreen event with image atikmpag.sys when I log in, but I do not know if that is related.

How do I work around this issue?

Canadian Luke
  • 24,640
reinierpost
  • 2,300

0 Answers0