How to open image in windows photo viewer?

Hello,

How can I open an image in the windows photo viewer with UiPath?
I was trying to use the ‘Use application/browser’ activity like below, but it only opens photoviewer and not the image I’m trying to view.
image

I also tried the same via ‘Start Process’, but then get the error “The system cannot find the file specified”
image

Also tried filling in the name of the image only. It opens the image, but then throws an error “Application could not be opened”.
image

I can off course turn on ‘Continue on Error’, but prefer not to use that. Is there a better way to open this file?

Thanks!

1 Like

Hi

Usually start process will work by passing the filepath of that Jpg file

Enable Continue on error property so that it OMR throw any error if that exception comes

And you will be able to see the application opening that image

Cheers @EvelineL

Hi Palaniyappan,

Thanks for your reply. Indeed I could enable continue on error, I was just wondering if there’s an error free way to do it :slight_smile:

Cheers,

Fine
May be you can create a bat file

That is open a notepad and mention like this

“Filepath of the application” “filepath of the jpg image”

And save it as .bat file

  1. Now pass that .bat file - filepath as input to START PROCESS activity and it will open the image with that mention application

Cheers @EvelineL

@EvelineL

You can try to open the image from Run window I hope it will work

  • Win+R
  • Type the path
  • Hit enter or click ok button