2

I have a huge collection of images my windows machine cycles through for backgrounds, and sometimes I want to find out what a particular photo is of.

Going to %AppData%\Microsoft\Windows\Themes shows you the images on each display, named Transcoded_000, Transcoded_001 et cetera; so they are without extension.
As such, you cant immediately open them nor teach explorer to associate them with an app/application.

So, what I thought to do was create a shortcut or batch file to <application> "<path>/Transcoded_blah" to call the app with the image as an argument. However, since Win10 has done away with the old (.exe) photo viewer of Win7, and replaced it with the Win8+ app "Photos", I actually don't know how to call it.

UWPs dont hide in Program Files and there's no Open file location on its start menu item nor on its executable in Task Manager whilst it's running, so I don't know where to look to find it.
I imagine there's a way to launch these apps (probably PowerShell or [hopefully not] vbs), and I'm hoping they also accept arguments, but whenever I google it the results are for the other way around (invoking shell from UWP).

How do I invoke a Win10 app and pass it something?

Hashbrown
  • 2,782
  • 4
  • 32
  • 47
  • Does this resource help: https://docs.microsoft.com/en-us/windows/uwp/xbox-apps/automate-launching-uwp-apps, or this: https://stackoverflow.com/questions/45978066/how-to-launch-exe-app-with-parameter-uwp ?? – Vomit IT - Chunky Mess Style Jan 06 '20 at 00:32
  • it did make me google a little closer to where I'd want, but it doesn't accept arguments. [thanks to this](https://docs.microsoft.com/en-us/windows/uwp/launch-resume/launch-default-app#photos-app-uri-scheme), powershell: `start ms-photos:viewer?fileName=C:\Users\\AppData\Roa ming\Microsoft\Windows\Themes\Transcoded_000.jpg`, it opens the right app, but the app doesn't open the image (I put the pull path, and copied the image out appending `.jpg` to eliminate confounding issues) – Hashbrown Jan 06 '20 at 01:14
  • If photos is your default app you can just do `start "c:\picture\pic1.jpg"` and it will launch in photos. Can't say I can offer anything useful on actually passing anything to the the viewer dll though. – Narzard Jan 06 '20 at 17:15
  • @Narzard the files do not have an extension at all, that's the issue. I need some way to *tell* the system it is an image (without renaming/scripting, just in a shortcut). If you're just reading the comments, it's a `.jpg` there because we thought we found a way but it wasn't working, so I manually renamed to test if we were even on the right track; we weren't, it (calling viewer manually) didn't work even with the extension – Hashbrown Jan 07 '20 at 04:55
  • This doesn't answer the question, but is an okay workaround. Chrome is capable of reading the magic byte header and doesn't need a file extension. You can create a shortcut pointing to `powershell start chrome file://C:\Users\...\Transcoded_001` and it'll work – Hashbrown Jan 30 '20 at 05:10

0 Answers0