Click or drag to resize
Ranorex

HostActivateWindowsApp Method (String, String, Duration)

Activates the windows app with the specified app user model ID.

Namespace:  Ranorex
Assembly:  Ranorex.Core (in Ranorex.Core.dll) Version: 12.7.4-git.38314c06
Syntax
public void ActivateWindowsApp(
	string appId,
	string appFamilyName,
	Duration timeout
)

Parameters

appId
Type: SystemString
The ID of the app.
appFamilyName
Type: SystemString
The family name of the app.
timeout
Type: RanorexDuration
A timeout specifying how long the app launcher process needs to stay open after activation of the app (see remarks).
Remarks
To automate Windows apps a process needs to be elevated, however, Windows apps can only be activated from a non-elevated process. Therefore, This methods starts a new non-elevated process that activates the Windows app.

For some applications, the activation process needs to stay alive until the activated app is fully loaded. The timeout argument determines how long the activation process should stay alive after activating the Windows app.

See Also