Open and close files from .bat file

1

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
    
asked by user84131 26.06.2018 в 19:16
source

1 answer

0

start rundll32.exe C: \ WINDOWS \ system32 \ shimgvw.dll, ImageView_Fullscreen path_of_the_image

    
answered by 05.07.2018 в 19:16