@breeze4me: Your longer code isn't relevant to me, because I need it to run non-Win10 apps, not native Win 10 apps.
@Rashad: Your last example with "pipe_hProcess" didn't work for me either - no app was launched. Sorry to report that!
But, I worked it out! I just had to massage the returned exe path to match the relevant app's folder name, and then used breeze4me's single RunProgram() line to launch it. Done and dusted.
The only thing I couldn't work out is if "C:\Program Files\WindowsApps" can be returned programmatically, rather than hard-coded. Can someone with a non-English Windows PC confirm if this path name is the same on there? Thanks. Here's how I've coded it for now:
Code: Select all
Global win10appdir$=GetUserDirectory(#PB_Directory_Programs) ; C:\Program Files (x86)\
a=FindString(win10appdir$," (")
If a
win10appdir$=Left(win10appdir$,a-1)
EndIf
win10appdir$+"\WindowsApps\" ; C:\Program Files\WindowsApps\