Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 276
  • Last Modified:

Graphics Viewer

I'm looking for a free graphics viewer with a command line option that will open up the first graphic file in a directory eg

viewer   c:\me\dropbox

and the first graphic appears on the screen and the user then has buttons such as Next and Previous to advance through the directory.

Now there's a large number of free viewers out there that offer this functionality except the ability to specify the directory concerned on the command line.  You have to use the viewer's File menu to find the directory and that I don't want.  I have a user for whom the File menu is too confusing, I just want the user to click on the icon and the specified directory appears for them (batch file hiding under the icon does the work).
0
dbrunton
Asked:
dbrunton
  • 5
  • 2
  • 2
4 Solutions
 
Joe Winograd, EE MVE 2015&2016DeveloperCommented:
IrfanView is excellent (free!) imaging software that I've been using for many years:
http://www.irfanview.com/

I recommend the Brothersoft link to download IrfanView:
http://www.brothersoft.com/download-irfanview-6224.html

This will download a single install file called <iview438_setup.exe> with no adware and no junk!

And the Brothersoft link for the PlugIns, which are required for PDF support:
http://www.brothersoft.com/download-irfanview-all-plugins-164981.html

This will download a single install file called <irfanview_plugins_438_setup.exe> with no adware and no junk!

Install IrfanView first, then install the PlugIns. Although I recommend adding the PlugIns to get PDF support, that's for general, future usage. For this situation, you don't need it.

IrfanView has a command line interface. The syntax for it is in a file called <i_options.txt> in the installation directory, which I have attached to this post for the latest release (4.38). But the quick solution for you is that it does exactly what you want — here's the command line:

i_view32.exe c:\me\dropbox

That will open up the first file in the directory and the Left/Right arrow buttons or the PgUp/PgDn buttons will advance through the directory. Of course, you should qualify the install directory in the icon/shortcut you make for the user, something like:

c:\Program Files (x86)\IrfanView\i_view32.exe c:\me\dropbox

or

c:\Program Files\IrfanView\i_view32.exe c:\me\dropbox

Regards, Joe
IrfanView-4.38-i-options.txt
0
 
dbruntonAuthor Commented:
Thanks Joe.

Ignore the swearing which might occur in the next few words.

I tried that on a Windows 7 machine, yesterday, with no joy, hence my posting here.  I'll be going back to that Windows 7 machine in a couple of days and try again.  Unsure what went wrong.  Irfan is my favourite graphics viewer.

Just tested on my XP box and it works OK.  **@!**&^%((*
0
 
Joe Winograd, EE MVE 2015&2016DeveloperCommented:
Works perfectly here in W7/64-bit — I just tested it to be absolutely certain. If you're using an old version, give the new one a try (4.38). It's a very recent release — 23-June.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
BillDLCommented:
Now now, db, I've never seen you swearing before.

Try it with as many permutations as you can, for example:

1. Full path to i_view32.exe enclosed in double quotes.
2. Full path of target folder enclosed in double quotes.
3. Path to exe AND target folder enclosed in double quotes.
4. Use Environment Variable %ProgramFiles% instead of C:\Program Files.
5. Path to target folder with and without a trailing backslash.

Normally on a modern OS you shouldn't need to double-quote paths with spaces between the folder or file names, but IrfanView can be quirky when run from the command line.

Just for your info, what I have done in the past with IrfanView when I run it from the command line is to create custom "i_view32.ini" configuration files in suitably named sub-folders that suit how I want it to behave for particular uses, and I specify the path to one of those custom INI files within the command, eg:
i_view32.exe "c:\image_folder_path" /ini="C:\Program Files\IrfanView\FullScreen\"

To configure a new INI file I just temporarily rename the existing INI file as a backup, open IrfanView and set all the options I want, then close it to update the INI file.  That is my custom one which I move to the sub-folder and I rename the backup back to i_view32.ini again.

If you want a new Right-Click option for folders that allows you to open the affected folder to the first image in full-screen view, then that is pretty easy to achieve with a simple registry addition.
0
 
Joe Winograd, EE MVE 2015&2016DeveloperCommented:
To follow-up on Bill's excellent point, keep in mind that on XP, the default is to store the actual <i_view32.ini> in the install directory (probably <c:\Program Files\IrfanView>). By "actual", I mean it contains all of the configuration settings (sections like [Language], [MRUD], [Resize], etc.). On W7, there is an <i_view32.ini> file in the install directory (probably <c:\Program Files\IrfanView> or <c:\Program Files\IrfanView (x86)>), but it doesn't contain the configuration settings — the default behavior is simply to have an [Others] section with a pointer to the real location of the config file, such as:

INI_Folder=%APPDATA%\IrfanView

That's where you'll find the actual <i_view32.ini> file. Regards, Joe
0
 
dbruntonAuthor Commented:
So I tried again and it worked.

"Path to Irfanview"  "Path to folder"

and yet I am sure I tried that on the weekend without joy.  All I got then was a black blank screen but today it  **@!**&^%((*  worked.  

Either I typed something wrong or not enough coffee or too much coffee or I didn't sacrifice a white rooster at midnight outside Microsoft's HQ.

Much appreciation to both of you.
0
 
Joe Winograd, EE MVE 2015&2016DeveloperCommented:
Probably due to the recent super moon.
0
 
BillDLCommented:
Thank you DB.

Speaking of full moons, there was an older "village idiot" kind of guy who lived a couple of streets along from me when I was a kid.  There was a pond at the end of his street in a wooded area.  He had warts all over his hands and elbows and his mother had tried all the usual topical meds without success.  There was a full moon coming up that had some kind of significance, hence me knowing about it when ordinarily I wouldn't have bothered about yet another moon phase.  A friend and I bumped into him the day before the full moon and he started moaning about the warts.  We made up a crazy on the spot hocus-pocus suggestion for the treatment of warts while stifling the sniggering.  We told him that if he went out next to water (for example a river or lake) on the eve of the full moon between three hours after sunset and midnight, while the moon was visible, stripped naked and rubbed half a sprouting potato on the affected area, the warts would disappear.

Of course we followed him on the night in question and laughed our heads off at his antics next to the pond, but he had the last laugh when his warts did disappear within a few weeks.  Coincidence or something to do with the poisonous glycoalkaloid Solanine?  Who knows, but I can recommend this as a viable alternative medicine if you are willing to suffer ridicule when you find yourself on YouTube chanting incantations at the water's edge and rubbing tuberous vegetables into your naked body.
0
 
Joe Winograd, EE MVE 2015&2016DeveloperCommented:
Hey, Bill, thanks for the laugh — great story!
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 5
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now