How to direct launch Metro App on win 8?

Ranorex Spy, Recorder, and Studio.
User avatar
sincoew
Posts: 48
Joined: Mon Nov 19, 2012 7:42 am

How to direct launch Metro App on win 8?

Post by sincoew » Thu Feb 07, 2013 1:40 pm

Hi,
I need to direct launch Metro App on win 8,
do not use start menu to switch metro mode.

I can use below code to direct launch metro app,
when metro app is running.

Code: Select all

repo.MetroApp.None.DoubleClick("56;41");
But if metro app not running, how can I direct launch APUT on Desktop mode?

Thanks a lot.
Best Regards,
sincoew

User avatar
sincoew
Posts: 48
Joined: Mon Nov 19, 2012 7:42 am

Re: How to direct launch Metro App on win 8?

Post by sincoew » Fri Feb 08, 2013 7:15 am

I found some method,
but my application need has admin privileges,
it's have another way to launch metro app on desktop mode?

http://social.msdn.microsoft.com/Forum ... ddaa012fb

Thanks a lot
Best Regards,
Robert Chen

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: How to direct launch Metro App on win 8?

Post by Support Team » Fri Feb 08, 2013 10:03 am

sincoew wrote:I found some method,
but my application need has admin privileges,
Ranorex already uses that method and handles the correct privileges for you when using the "RunApplication" action. This is currently kind of a hidden feature in Ranorex Recorder, since it does not work with every app (depends on how the app is implemented - it works with the standard Windows 8 apps, though).

No matter whether the Windows 8 UI app (aka Metro) is already running or not, Ranorex will bring it to front when you call the "RunApplication" action passing the "AppUserModelId" (see below). In other words, calling "RunApplication" will make the Windows 8 app visible, so either start it or bring it to the front.

The "AppUserModelId" is the concatenation of the "AppFamilyName" + "!" + "AppId". You can get the values for "AppFamilyName" and "AppId" when you track the Windows 8 app with Spy. For example, the "AppUserModelId" you need to pass as "File Name" to the "RunApplication" action for the app tracked below is "22cc0655-...-ef29_vjcrm1nkfeck2!App":
AppUserModelId.PNG
AppUserModelId.PNG (5.72 KiB) Viewed 2544 times
Regards,
Alex
Ranorex Team
.
Image

User avatar
sincoew
Posts: 48
Joined: Mon Nov 19, 2012 7:42 am

Re: How to direct launch Metro App on win 8?

Post by sincoew » Wed Feb 20, 2013 3:39 am

Hi Alex,

Thanks detailed descriptions, it's fix my problem.
: )

Best Regards,
sincoew