-
-
Notifications
You must be signed in to change notification settings - Fork 642
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows Store/immersive apps: obtain product name and version via package functions if possible #10108
Milestone
Comments
Hi, Another case: Notepad in 20H1 build 18963 which is now a converted desktop app and will be updated via Microsoft Store. Thanks. |
Hi, After thinking about it, I am going to attempt the following solution:
Notes:
Thanks. |
josephsl
added a commit
to josephsl/nvda
that referenced
this issue
Aug 18, 2019
…ve (hosted) apps via kernel32::GetPackageFullName function. Re nvaccess#10108. On Windows 8 and later, some apps can run inside a container. This is the case for WinRT/UWP apps, some web apps, and converted desktop apps (such as Microsoft Office 365 downloaded from Microsoft Store). For these apps, kernel32.dll::GetPackageFullName returns the 'real' product info such as name and version. Because it'll be returned in a serialized string representation, parse the first two values (name and version). To accomodate this change, the former method of obtaining product name and version via file version info has been moved to an internal function inside product info setter method. This function will be invoked if: * This is Windows 7/Server 2008 R2 (no support for containers yet). * An immersive app that is really a native pap (such as File Explorer). * Converted desktop apps that will not expose version info via file version info structure (such as Notepad in 20H1 Preview build 18963 and later). For consistency with immersive app info structure, the modified function will return a 2-tuple that records product name and version in that order.
josephsl
added a commit
to josephsl/nvda
that referenced
this issue
Sep 8, 2019
…ve (hosted) apps via kernel32::GetPackageFullName function. Re nvaccess#10108. On Windows 8 and later, some apps can run inside a container. This is the case for WinRT/UWP apps, some web apps, and converted desktop apps (such as Microsoft Office 365 downloaded from Microsoft Store). For these apps, kernel32.dll::GetPackageFullName returns the 'real' product info such as name and version. Because it'll be returned in a serialized string representation, parse the first two values (name and version). To accomodate this change, the former method of obtaining product name and version via file version info has been moved to an internal function inside product info setter method. This function will be invoked if: * This is Windows 7/Server 2008 R2 (no support for containers yet). * An immersive app that is really a native pap (such as File Explorer). * Converted desktop apps that will not expose version info via file version info structure (such as Notepad in 20H1 Preview build 18963 and later). For consistency with immersive app info structure, the modified function will return a 2-tuple that records product name and version in that order.
josephsl
added a commit
to josephsl/nvda
that referenced
this issue
Sep 8, 2019
…getExecutableFileInfo. Re nvaccess#10108. Reviewed by Mick Curran (NV Access): because of what the internal function does, it is better to give it a more descriptive name than just 'executable file info'.
josephsl
added a commit
to josephsl/nvda
that referenced
this issue
Sep 10, 2019
…ts own method in base pap module. Re nvaccess#10108. Suggested by Leonard de Ruijter (Babbage): transform executable file info function from an internal one to a private method in base app module for ease of future maintenance.
michaelDCurran
pushed a commit
that referenced
this issue
Sep 10, 2019
…e to obtain product info for immersive (hosted) apps (#10114) * App modules/product name and version: obtain product info for immersive (hosted) apps via kernel32::GetPackageFullName function. Re #10108. On Windows 8 and later, some apps can run inside a container. This is the case for WinRT/UWP apps, some web apps, and converted desktop apps (such as Microsoft Office 365 downloaded from Microsoft Store). For these apps, kernel32.dll::GetPackageFullName returns the 'real' product info such as name and version. Because it'll be returned in a serialized string representation, parse the first two values (name and version). To accomodate this change, the former method of obtaining product name and version via file version info has been moved to an internal function inside product info setter method. This function will be invoked if: * This is Windows 7/Server 2008 R2 (no support for containers yet). * An immersive app that is really a native pap (such as File Explorer). * Converted desktop apps that will not expose version info via file version info structure (such as Notepad in 20H1 Preview build 18963 and later). For consistency with immersive app info structure, the modified function will return a 2-tuple that records product name and version in that order. * App module handler/product name and version: _executableFileInfo -> _getExecutableFileInfo. Re #10108. Reviewed by Mick Curran (NV Access): because of what the internal function does, it is better to give it a more descriptive name than just 'executable file info'. * App module handler/product name and version for immersive apps: typo fix. * Product name and version: separate executable file info function to its own method in base pap module. Re #10108. Suggested by Leonard de Ruijter (Babbage): transform executable file info function from an internal one to a private method in base app module for ease of future maintenance.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
Based on #7894 work:
Is your feature request related to a problem? Please describe.
App module class's product name and version descriptors are used to obtain name and version of the app associated with the app module class. However, there are cases when this does not work, particularly in regards to Windows Store apps (sometimes called "immersive apps"). For these, a container process is used, which causes file utils to say "invalid file version info".
The best known case is Windows 10 Calculator. Although the executable is unique (not wwahost.exe), product name and version cannot be fetched. Another example is Office 365 apps from Microsoft Store that not only presents a high-level version information (because these are converted desktop apps), but also comes with internal versions as seen through Store app package information (for example, 16.0 for desktop apps versus 16051 for Store apps).
Describe the solution you'd like
Detect and retrieve product name and version for immersive apps via package info functions from kernel32.dll (see #7894 for mechanics of this). If the app is not a hosted (immersive) app (such as on Windows 7 and many apps on Windows 8.x and 10), fall back to version info lookup.
Describe alternatives you've considered
None - leave it as is.
Additional context
Mostly useful for app module writers as they can easily detect versions for hosted apps in order to write workarounds. A proof of concept implementation is under active testing via Windows 10 App Essentials add-on.
Thanks.
The text was updated successfully, but these errors were encountered: