Apologies if this is blatantly obvious but is there a way to select and/or run an "App" such as Movies and TV in WinBatch? Obviously one can use AskFileName() to get an EXE but Apps don't appear to work that way.
Jim
Are you referring to Windows App Store applications?
Quote from: JTaylor on August 11, 2020, 08:58:09 PM
Apologies if this is blatantly obvious but is there a way to select and/or run an "App" such as Movies and TV in WinBatch? Obviously one can use AskFileName() to get an EXE but Apps don't appear to work that way.
Jim
;This is what I do. This assumes that app is the complete path name to the .exe or data file.
folder = filepath(app)
stemname = FileBaseName(app,0)
beep
shellexecute(app, "", Folder, @NORMAL, "" )
Sorry. Not sure how I missed the responses to this question. Yes. App Store stuff.
Jim
Assuming you mean "Metro", "Universal", "Modern", or "Windows Store", or "WinRT" app or whatever the current "correct" name is, it kinda depends. MSFT has changed how things work from one version of Windows to the next and with different versions of Windows 10. If you get lucky, you can just use ShellExecute or ShellExecuteWait with a URI.
ShellExecute('ms-people:','','',@normal, '')
I have done some more looking but still no idea how one finds the name one would use??? Using Movies & TV as an example...how would I know what name to use for launching? I cannot find any link/path info from pulling it up.
Is this something that would be a possible WinBatch Function? Retrieving a list of "Apps" along with useful information such as what is needed to launch said App?
Jim
There is the "Win32_Product" WMI class you can use to identify the installed apps It has a "name" property but not sure if that name is coincident with the name used for the URI when an app has one. You could try looking in the registry. For example, ms-people is stored under "HKEY_USERS\S-1-5-21-XXXXXX-XXXXXxx-XXXXXXX-XXxx\Software\Classes\Extensions\ContractId\Windows.Protocol\PackageId\Microsoft.People_10.1909.10841.0_x64__8wekyb3d8bbwe\ActivatableClassId\x4c7a3b7dy2188y46d4ya362y19ac5a5805e5x.AppX45jpe95vqv25mqhjw05b5y7sz973men8.mca\CustomProperties" for example. With the same caveats, a name is stored under the "name" value. There may be other simpler ways of identifying URIs on the system but I can't think of any at the moment.
MSFT likes to keep the WinRT subsystem separate from "desktop" applications so there isn't a lot of cross communication. However, because they haven't had as much success as they like with their phonizing of the desktop computer the walls are starting to come down based on which version of Windows 10 you are using.
Okay. Thanks.
Jim