Click or drag to resize
Ranorex

UtilIsRestartRequiredForWinAppAccess Property

Gets a value indicating whether a restart is required to access Windows apps.

Namespace:  Ranorex.Core
Assembly:  Ranorex.Core (in Ranorex.Core.dll) Version: 12.7.4-git.38314c06
Syntax
public static bool IsRestartRequiredForWinAppAccess { get; }

Property Value

Type: Boolean
Remarks
If this property returns true, the current process does not have the required privileges to access Windows apps. You can get the those privileges by calling the RestartWithUiAccess method like in the example below.
Examples
The following code checks for the privileges to access Windows apps and restarts the executable in order to get those privileges:
if (Ranorex.Core.Util.IsRestartRequiredForWinAppAccess)
    return Ranorex.Core.Util.RestartWithUiAccess();
See Also