Click here to Skip to main content
15,897,187 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I can open one file from c# as follows:

string exe = "C:\\Windows\\System32\\rundll32.exe"
string arguments = "\"C:\\Program Files (x86)\\Windows Photo Viewer\\PhotoViewer.dll\", ImageView_Fullscreen c:\\test.jpg";
Process.Start(exe, arguments);

but when I try opening multiple files as follows

string exe = "C:\\Windows\\System32\\rundll32.exe"
string arguments = "\"C:\\Program Files (x86)\\Windows Photo Viewer\\PhotoViewer.dll\", ImageView_Fullscreen c:\\test.jpg & c:\\test2.jpg";
Process.Start(exe, arguments);

It works for one file or on the command line but it doesn't work in c#. Anyone have any ideas?

[This is the re-post of the inquirer's previous questions: Open multiple files using photo viewer[^]. As I can see, my syntax fix is taken into account, but the problem is probably not solved. —SA]
Posted
Updated 21-Jun-15 16:51pm
v3
Comments
Sergey Alexandrovich Kryukov 21-Jun-15 22:57pm    
Who told you that this stupid MS viewer can show more than one file this way? And why would you use this pretty stupid viewer at all? You can always show an image in your own application.

And please don't re-post; this is considered as abuse. You should have edit your previous question, ask follow-up question to an available answer in comments, and so on. This question is not new, you could continue with the previous question.

—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900