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
Ability to open Windows Store Apps #238
Comments
@dewijones94 The issue here is that all Xbox App Games I've seen are actually Microsoft Store Games, and those have a completely different way of running. They use the new UWP or Windows App way of operating, which doesn't really work easily with .net Framework-based software like DisplayMagician. I've already had a person request some support for UWP games under #98, but it's really not very simple to add. I've already added the ability to start a UWP app (but not monitor it for closure), but that is under the Application section, not the game one. To use it, create an Application shortcut rather than a Game shortcut. You should be able to select Forza Horizon 5 from the list of Applications, and it will still work ok - though please note that DisplayMagician is unlikely to be able to detect that the game has started so it will likely just finish the game shortcut and revert everything back straight away. Unfortunately this is a windows permission thing, and the only way I can get around that is to completely rewrite DisplayMagician from scratch as a new WinUI3 Windows App. I've actually started doing just that, but it will take 6 month to a year to port everything over as it is such a massive change in the background. The WinUI version will be called DisplayMagician v3, and will be able to run/monitor UWP and Windows App games just as well as traditional apps. Hope that clarifies? Thanks |
hi, maybe it will help to use the cmdline mentioned in that article; (bottom) AND / OR a dedicated powershell script which u can reference in DPM. |
Thanks both. Completely understand it’s not a quick think @terrymacdonald, just wanted to put it forward for consideration. I’m happy to work round it for now, honestly loving the app so far! And also happy to help beta test anything for you 😉 @dev1981 using the shell command works to launch it, unfortunately using the exe to detect when it’s closed doesn’t work either, so I’ve built a loop in the script to monitor for the exe and close when it ends so it can use that to switch back the display, so definitely a workaround for now as well! |
Hi @dewijones94
Would you be open to providing me a copy of the script with the loop in it
so I can add it to the troubleshooting page of the wiki so that others can
make use of it? I'd really love to provide others with a temporary
workaround until I can find time to get DisplayMagician v3 completed.
To be clear, your coffee would become part of the DisplayMagician codebase
and so would be licensed as GPL v3.
Thanks
Terry
…On Fri, 30 Jun 2023, 03:24 dewijones94, ***@***.***> wrote:
Thanks both. Completely understand it’s not a quick think @terrymacdonald
<https://github.com/terrymacdonald>, just wanted to put it forward for
consideration. I’m happy to work round it for now, honestly loving the app
so far! And also happy to help beta test anything for you 😉
@dev1981 <https://github.com/dev1981> using the shell command works to
launch it, unfortunately using the exe to detect when it’s closed doesn’t
work either, so I’ve built a loop in the script to monitor for the exe and
close when it ends so it can use that to switch back the display, so
definitely a workaround for now as well!
—
Reply to this email directly, view it on GitHub
<#238 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABLU5LDGS7CRAVDXEULDPP3XNWM4LANCNFSM6AAAAAAZVKJRGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hi @terrymacdonald certainly, I can send over first thing with some instruction to customise it for other apps as well. 7:45pm here and I’m not sat at my computer right now! |
Here is the batch i am using, just a very simple launch and wait essentially. The App launch shortcut is done using the link above that Dev1981 shared also https://answers.microsoft.com/en-us/windows/forum/all/starting-windows-10-store-app-from-the-command/836354c5-b5af-4d6c-b414-80e40ed14675 In my example below, i use a loopback ping to wait because the pre-wrapper takes ages to launch the actual executable (forza things) but i would recommend leaving it in and reducing it based on the time it takes for their app to launch. Then i am just using tasklist to search for the exe and loop if its still running every 5 seconds. Also, to note, tasklist results are case sensitive, so for example, my "ForzaHorizon5" would not be detected if it was in lower case.
On a complete side note, when game shortcuts are created in your application, are they stored somewhere? I am getting an unhandled exception when loading the shortcuts screen, displaying the shortcuts, and i think its because it might be referencing an icon no longer there? So justy wanted to try manually deleting them and seeing if it'll load then. If the icon is the issue, might be worth opening another issue to add a default icon if one is not found to catch the exception? |
Further on the above regarding the unhandled exception, i have found the cause. I managed to find the JSON file that the shortcuts are listed in and removed the one i created pointing to the batch file. This then stopped displaying the unhandled exception. To be sure it was that i recreated the shortcut and as soon as i click save, the unhandled exception comes up. If i click continue, the area where the shortcuts displayed just displays a red cross over it. I'm guessing this is because im referencing a bat file and its unable to scrap the icon for this? I've pasted the exception text for you below. Would it be best to have a fallback on this scrape, where the launching file is not an exe, and falls back to a default DisplayMagician Icon? ************** Exception Text ************** |
Yeah I guess it is that for the exception. I'll have to update the file
scanning code to find that post. Nice find!
Thanks
Terry
…On Fri, 30 Jun 2023, 19:43 dewijones94, ***@***.***> wrote:
Hi @terrymacdonald <https://github.com/terrymacdonald>
Further on the above regarding the unhandled exception, i have found the
cause. I managed to find the JSON file that the shortcuts are listed in and
removed the one i created pointing to the batch file. This then stopped
displaying the unhandled exception. To be sure it was that i recreated the
shortcut and as soon as i click save, the unhandled exception comes up. If
i click continue, the area where the shortcuts displayed just displays a
red cross over it.
I'm guessing this is because im referencing a bat file and its unable to
scrap the icon for this? I've pasted the exception text for you below.
Would it be best to have a fallback on this scrape, where the launching
file is not an exe, and falls back to a default DisplayMagician Icon?
************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of
an object.
at DisplayMagician.UIForms.ShortcutILVRenderer.DrawItem(Graphics g,
ImageListViewItem item, ItemState state, Rectangle bounds)
at
Manina.Windows.Forms.ImageListView.ImageListViewRenderer.RenderItems(Graphics
g)
at
Manina.Windows.Forms.ImageListView.ImageListViewRenderer.Render(Graphics
graphics)
at Manina.Windows.Forms.ImageListView.OnPaint(PaintEventArgs e)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e,
Int16 layer)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)
—
Reply to this email directly, view it on GitHub
<#238 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABLU5LHLWA4PUR55CN2K2GTXNZ7R7ANCNFSM6AAAAAAZVKJRGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Thanks, so wouldn't really be able to use that as a workaround until thats handled, as it would break the shortcuts menu for users. |
@dewijones94 Are you able to test your batch file with this new test version of DisplayMagician I've made? The latest test version should be working properly, and hopefully fixes your issue. Could you please test it for me so I know that it fixes your issue? If it does then I'll be able to close this issue as the fix will be part of the next full release. DisplayMagicianSetup-V2.6.0.515-No-NvApi_SetDisplayConfig.zip Thanks! |
@dewijones94 I've been testing opening UWP apps and monitoring them from DisplayMagician, and I think the most recent code changes may have managed to get this working. DisplayMagicianSetup-v2.6.0.521-uwp.zip Can you please install this test version and see that you can open Windows Store apps and DisplayMagician will wait for them to close? Thanks |
Oops I broke the setup with my previous version. This version has a corrected setup that should install everything properly. DisplayMagicianSetup-v2.6.0.522-corrected-setup.zip Thanks |
While trying to create shortcuts to Xbox App Games i get an access denied launching the actual exe, this is because of the way permissions are handled by Xbox and there is no way to alter the permissions of the exe. The actual app that i am trying to create a shortcut to is Forza Horizon 5.
I'd assume that having the ability to choose an app installed on the device as the shortcut, rather than just an exe or com library would negate this message, bypassing the need to use the exe.
The text was updated successfully, but these errors were encountered: