Skip to content
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

Launching Windows Apps #16

Open
jonmchan opened this issue Jun 29, 2024 · 3 comments
Open

Launching Windows Apps #16

jonmchan opened this issue Jun 29, 2024 · 3 comments
Assignees

Comments

@jonmchan
Copy link

Windows 11 has some apps that aren't standard .exe anymore. Had to do some googling, but to launch something like the LinkedIn app, you have to do something like:

start shell:appsFolder\7EE7776C.LinkedInforWindows_w1wdnht996qgy!App

When trying this in vdesk, it fails.

C:\Users\jonathan>vdesk run -o 4 shell:appsFolder\7EE7776C.LinkedInforWindows_w1wdnht996qgy!App
<3>VDesk.Commands.RunCommand[0] An error occurred trying to start process 'shell:appsFolder\7EE7776C.LinkedInforWindows_w1wdnht996qgy!App' with working directory 'C:\Users\jonathan'. The system cannot find the file specified.
        Windows version: 10.0.22631.3810

I have no idea what kind of reference this is, but can it be supported in vdesk?

@jonmchan
Copy link
Author

Windows 10/11 is really missing a simple way to launch Windows Apps from command line... it should be something like windows-app-launcher (maybe i'll write one?)...

Anyways, to do this - you follow this methodology to figure out what the app exe is called:

https://answers.microsoft.com/en-us/windows/forum/windows_10-windows_store/starting-windows-10-store-app-from-the-command/836354c5-b5af-4d6c-b414-80e40ed14675

Then you can use explorer to launch it.

vdesk run -o 4 -a "shell:appsFolder\7EE7776C.LinkedInforWindows_w1wdnht996qgy!App" explorer.exe

@jonmchan
Copy link
Author

Launching script successfully written. It is available at https://github.com/jonmchan/windows-app-cmdline-launcher.

Now you can simply launch Microsoft Store apps with the following:

.\launch.bat Slack

Vdesk command would be something like:

vdesk run -o 2 -a Slack launch.bat

This causes vdesk to unfortunately hang. My guess would be that the launch batch script doesn't have a window, but launches a subprocess. vdesk is monitoring for the launched process to spawn a window and move it to the right virtual desktop. Since no window is directly spawned, it hangs indefinitely. Any ideas how to workaround?

@jonmchan jonmchan reopened this Jun 29, 2024
@LittleVaaty
Copy link
Owner

Hi,
i will investigate but my guest is windows app don't work like regular exe and the process is managed differently.
I will see what can i do about it.

@LittleVaaty LittleVaaty self-assigned this Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants