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":