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

How to use start to uwp application? #784

Open
Escapingbug opened this issue Aug 1, 2019 · 1 comment
Open

How to use start to uwp application? #784

Escapingbug opened this issue Aug 1, 2019 · 1 comment

Comments

@Escapingbug
Copy link

@Escapingbug Escapingbug commented Aug 1, 2019

I'm trying to automate the interaction with WindowsTerminal. It seems to be a UWP application, which I have no idea how to start such application directly using Application().start. I've tried to locate it using Desktop, but got quite confused..

Any help on this?

@vasily-v-ryabov
Copy link
Contributor

@vasily-v-ryabov vasily-v-ryabov commented Aug 7, 2019

Hi @Escapingbug this is very good question. We have no built-in way to start UWP app by its name. But there are few ways to do that.

If it's not critical to share your script for several PCs, you can run Task Manager, go to tab "Details", find your app, do right click and choose "Open file location". Path to executable file will be open in explorer.exe. Not sure this way is resistant to the app update.

Also I could find PowerShell command (checked for Skype as an example):

Get-AppxPackage -allusers *Skype* | foreach {start shell:AppsFolder\$($_.PackageFamilyName)!App}

So you have to add powershell.exe to your command in subprocess.Popen(...) call and then use Application(backend="uia").connect(path="your_app.exe") subsequently.

Hope it helps for now.

It's also possible to use new Win32 API functions controlling WindowsStore app packages inside pywinauto. But this feature request needs some time for learning and implementation. Can't promise to implement it soon. Let's keep this issue open for future contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.