Page 1 of 1

How to direct launch Metro App on win 8?

Posted: Thu Feb 07, 2013 1:40 pm
by sincoew
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

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

Posted: Fri Feb 08, 2013 7:15 am
by sincoew
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

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

Posted: Fri Feb 08, 2013 10:03 am
by Support Team
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
Regards,
Alex
Ranorex Team

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

Posted: Wed Feb 20, 2013 3:39 am
by sincoew
Hi Alex,

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

Best Regards,
sincoew