Launching Windows Photo Viewer

  • Thread starter Thread starter D A M
  • Start date Start date
D

D A M

Guest
I'm trying to launch Windows Photo Viewer programmatically. I've tried several methods that are professed to work but none of them do. I don't get any errors but I don't get the viewer either. I've tried (hardcoded paths just to illustrate):

var process = new Process( );
process.StartInfo.FileName = "c:\\windows\\system32\\rundll32.exe ";
process.StartInfo.Arguments = "\"c:\\program files\\windows photo viewer\\photoviewer.dll\",ImageView_Fullscreen c:\\myimg.png";

process.Start( );


Also:

var psi = new ProcessStartInfo( );
psi.FileName = "c:\\windows\\system32\\rundll32.exe ";
psi.Arguments = "\"c:\\program files\\windows photo viewer\\photoviewer.dll\", ImageView_Fullscreen c:\\myimg.png";
psi.UseShellExecute = false;
psi.CreateNoWindow = true;
Process.Start( psi );

This is on Win7 x64 VS2012. Any ideas?

Continue reading...
 
Back
Top