Display an image with a batch file

batcheur -  
logon313 Posted messages 50 Status Membre -
Good evening
I would like to write a batch script that displays an image stored in a directory, for example "c:/documents and settings/images/toto.jpg" thank you for your help

Configuration: Windows XP / Internet Explorer 8.0

4 réponses

Demonikar Posted messages 18 Status Membre 10
 
I don't think it's possible in batch, but if you're on Windows, you can use the HTML application...
Open Notepad and write this code:

 <html> <head> <title>image title</title> <script language="vbs"> ResizeTo 460,860 MoveTo 475,225 </script> <hta:application scroll="no" maximizebutton="no" border="thin" CONTEXTMENU="no"> </head> <body> <img src="c:/documents and setting/images/toto.jpg" height="100%" width="100%" > </html> 


and save the file as: image.hta
(make sure the extension is .hta)

Otherwise, look for an image to .exe converter, I'm not sure, but it should exist xD
Oh yes, to open it with a batch:

 @echo off start "" "image.hta" 


or with the call command instead of start (
 call image.hta 
)
3
dubcek Posted messages 18702 Registration date   Status Contributeur Last intervention   5 657
 
hello
put in a .bat file
@echo off "c:\documents and setting\images\toto.jpg"
1
aa
 
Hello.
Is it possible to display only the image for a certain period of time?
(I mean displaying the image without opening it in software)
Thank you.
0
Batcher
 
@aa No, it's not possible.
0
logon313 Posted messages 50 Status Membre 9
 
si!

@echo off
::open the image
start explorer "c:\documents and settings\images\toto.jpg"
::wait
ping localhost -n "replace with the time in seconds" >nul
:close the window
TASKKILL /F /IM explorer.exe /T
::to minimize the risk of data loss, I add three seconds
ping localhost -n 3 >nul
::restore the taskbar
start explorer
0
zephir666 Posted messages 136 Status Membre 10
 
Hello
have you tried adding "start" in front of your path?
0
logon313 Posted messages 50 Status Membre 9
 
it's possible from external commands.. you just have to understand what's written ^^
I really invite you to go to the forum batch.xoo.it
https://batch.xoo.it/t3738-exe-Commande-externe-AffichePNG-exe.htm

--
very young computer enthusiast
0