Wikis - Page

Knowledge Document: PowerShell script to add the UseNativeUI registry key

2 Likes

Environment

9.4 and above

Situation

Users may not want to go into Registry Editor to add the UseNativeUI key themselves

Resolution

Below is the PowerShell script which can add the UseNativeUI key into Registry Editor and set its value to 1:

# Define the path to the registry key
$registryPath = "HKCU:\Software\Micro Focus\Content Manager\OfficeAddins"

# Define the name of the DWORD value
$dwordName ="UseNativeUI"

# Define the value to be set (DWORD value)
$dwordValue = 1

# Create the registry key if it doesn't exist
If (-not (Test-Path $registryPath)) {
New-Item -Path $registryPath -Force
}

# Create the new DWORD value or update it if it already exists
New-ItemProperty -Path $registryPath -Name $dwordName -Value $dwordValue -PropertyType DWORD -Force

# Output a message indicating success
Write-Output "DWORD value '$dwordName' set to '$dwordValue' in '$registryPath'"

Labels:

Support Tips/Knowledge Docs
Comment List
Related
Recommended