With the following .bat I can open a text document and make it close in a few seconds:
@ECHO OFF
START "" notepad.exe "%USERPROFILE%\Desktop\Documento de texto.txt"
TIMEOUT /T 5 > NUL
TASKKILL /IM notepad.exe
PAUSE
EXIT
How can I do the same with an image and the Windows Photo Viewer?
I tried to open an image with the following command but it only works if the image is in the same directory as the .bat and using "% ~ dp0":
START "" %SystemRoot%\System32\rundll32.exe "%ProgramFiles%\Windows Photo Viewer\PhotoViewer.dll", ImageView_Fullscreen %~dp0Imagen.jpg