Display an image with a batch file

batcheur -  
logon313 Posted messages 50 Status Member -
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 answers

  1. Demonikar Posted messages 18 Status Member 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
  2. dubcek Posted messages 18627 Registration date   Status Contributor Last intervention   5 660
     
    hello
    put in a .bat file
    @echo off "c:\documents and setting\images\toto.jpg"
    1
    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
    2. Batcher
       
      @aa No, it's not possible.
      0
    3. logon313 Posted messages 50 Status Member 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
  3. zephir666 Posted messages 136 Status Member 10
     
    Hello
    have you tried adding "start" in front of your path?
    0