{"id":2903,"date":"2024-07-14T04:03:05","date_gmt":"2024-07-13T20:03:05","guid":{"rendered":"https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/?p=2903"},"modified":"2025-04-14T22:26:16","modified_gmt":"2025-04-14T14:26:16","slug":"restoring-the-nvidia-control-panel-and-tools-after-the-appx-package-change","status":"publish","type":"post","link":"https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/2024\/07\/14\/restoring-the-nvidia-control-panel-and-tools-after-the-appx-package-change-2903","title":{"rendered":"Restoring the NVIDIA Control Panel and Tools after the Appx Package Change"},"content":{"rendered":"<p>Updated 12th August 2024:<\/p>\n<ul>\n<li>Post install code snippets updated<\/li>\n<li>Article wording updated<\/li>\n<\/ul>\n<p>With the move from the Standard driver model to the DCH (Declarative Componentized Hardware) driver model implemented from GRID 15.0 (Windows driver version 527.41) and above, the NVIDIA Control Panel app is now distributed through the Microsoft Store as an Appx Package. Even though the base Appx Package is added as part of the driver package install, it might fail to be installed per user if the Microsoft Store is disabled, the system is not connected to the Internet, or installation of apps from the Microsoft Store is blocked by your system settings. Other than the Administrative user that installed the driver, this is not installed by default for other users using Windows Server 2019 and Windows 10 LTSC 2019 (version 1809).<\/p>\n<p>Furthermore, even when the Appx Package is registered, users and local Administrators cannot directly launch the nvcplui.exe and NvGpuUtilization.exe tools.<\/p>\n<p><a href=\"https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-content\/uploads\/2024\/07\/NVIDIA-Control-Panel-and-Tools.png\"><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter size-large wp-image-2956\" src=\"https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-content\/uploads\/2024\/07\/NVIDIA-Control-Panel-and-Tools-680x440.png\" alt=\"NVIDIA Control Panel and Tools\" width=\"680\" height=\"440\" srcset=\"https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-content\/uploads\/2024\/07\/NVIDIA-Control-Panel-and-Tools-680x440.png 680w, https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-content\/uploads\/2024\/07\/NVIDIA-Control-Panel-and-Tools-300x194.png 300w, https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-content\/uploads\/2024\/07\/NVIDIA-Control-Panel-and-Tools-768x497.png 768w, https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-content\/uploads\/2024\/07\/NVIDIA-Control-Panel-and-Tools.png 1395w\" sizes=\"(max-width: 680px) 100vw, 680px\" \/><\/a><\/p>\n<p><!--more-->They will receive an &#8220;Access to the path &#8216;C:\\Program Files\\WindowsApps&#8217; is denied'&#8221; error when launching from a command line. An example of the path:<\/p>\n<pre class=\"brush: plain; auto-links: false; gutter: false; title: ; toolbar: false; notranslate\" title=\"\">\r\nC:\\Program Files\\WindowsApps\\NVIDIACorp.NVIDIAControlPanel_8.1.963.0_x64__56jybvy8sckqj\\nvcplui.exe\r\nC:\\Program Files\\WindowsApps\\NVIDIACorp.NVIDIAControlPanel_8.1.963.0_x64__56jybvy8sckqj\\NvGpuUtilization.exe\r\n<\/pre>\n<p>They will receive a &#8220;Windows cannot access the specified device, path, or file. You may not have the appropriate permissions to access the item.&#8221; error when launching when via File Explorer.<\/p>\n<pre><a href=\"https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-content\/uploads\/2024\/07\/Error-when-launching-the-nvcplui-directly.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-2949\" src=\"https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-content\/uploads\/2024\/07\/Error-when-launching-the-nvcplui-directly.png\" alt=\"Error when launching the nvcplui directly\" width=\"558\" height=\"137\" srcset=\"https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-content\/uploads\/2024\/07\/Error-when-launching-the-nvcplui-directly.png 558w, https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-content\/uploads\/2024\/07\/Error-when-launching-the-nvcplui-directly-300x74.png 300w\" sizes=\"(max-width: 558px) 100vw, 558px\" \/><\/a><\/pre>\n<p>This is by design for the WindowsApps folder. Even though you may read about others changing the permissions on this folder structure, I don&#8217;t feel it&#8217;s appropriate, especially from an Enterprise Support point of view. There are reasons why we shouldn&#8217;t change these Operating System permissions that are locked down for a purpose.<\/p>\n<p>The new correct way to start the Microsoft Store NVIDIA Control Panel (nvcplui.exe) app is via the following command line:<\/p>\n<pre class=\"brush: plain; auto-links: false; gutter: false; title: ; toolbar: false; notranslate\" title=\"\">\r\nexplorer.exe shell:appsFolder\\&lt;PackageFamilyName&gt;!NVIDIACorp.NVIDIAControlPanel\r\n<\/pre>\n<p>The PackageFamilyName can be found from the output of the following cmdlet: Get-AppxPackage -Name &#8220;Nvidia*&#8221;<\/p>\n<p><a href=\"https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-content\/uploads\/2024\/07\/Get-AppxPackage-for-Nvidia.png\"><img decoding=\"async\" class=\"aligncenter size-large wp-image-2912\" src=\"https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-content\/uploads\/2024\/07\/Get-AppxPackage-for-Nvidia-680x261.png\" alt=\"Get-AppxPackage for Nvidia\" width=\"680\" height=\"261\" srcset=\"https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-content\/uploads\/2024\/07\/Get-AppxPackage-for-Nvidia-680x261.png 680w, https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-content\/uploads\/2024\/07\/Get-AppxPackage-for-Nvidia-300x115.png 300w, https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-content\/uploads\/2024\/07\/Get-AppxPackage-for-Nvidia-768x295.png 768w, https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-content\/uploads\/2024\/07\/Get-AppxPackage-for-Nvidia.png 862w\" sizes=\"(max-width: 680px) 100vw, 680px\" \/><\/a><\/p>\n<p>Although not ideal, I can deal with that and update my tools as needed.&nbsp;However, as per NVIDIA bug #4644253 as referenced in Case #00697597, the NvGpuUtilization.exe tool cannot be launched this way because an application ID is missing from the AppxManifest.xml.<\/p>\n<p><a href=\"https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-content\/uploads\/2024\/07\/NVIDIA-AppxManifest.xml_.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-2915\" src=\"https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-content\/uploads\/2024\/07\/NVIDIA-AppxManifest.xml_-680x290.png\" alt=\"NVIDIA AppxManifest.xml\" width=\"680\" height=\"290\" srcset=\"https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-content\/uploads\/2024\/07\/NVIDIA-AppxManifest.xml_-680x290.png 680w, https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-content\/uploads\/2024\/07\/NVIDIA-AppxManifest.xml_-300x128.png 300w, https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-content\/uploads\/2024\/07\/NVIDIA-AppxManifest.xml_-768x327.png 768w, https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-content\/uploads\/2024\/07\/NVIDIA-AppxManifest.xml_.png 1780w\" sizes=\"(max-width: 680px) 100vw, 680px\" \/><\/a><\/p>\n<p>This was an &#8220;Are you kidding me?&#8221; moment for me. For all their profits and brilliant Engineering, they certainly&nbsp;didn&#8217;t put enough thought into re-engineering how the Control Panel and supporting tools should work. You can see in the following screen shot that the NvGpuUtilization.exe tool is installed as part of the Appx Package, but you can&#8217;t launch it. What&#8217;s the point of that? How did that even pass development and QA testing?<\/p>\n<p><a href=\"https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-content\/uploads\/2024\/07\/NVIDIA-AppxPackage-Files.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2918\" src=\"https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-content\/uploads\/2024\/07\/NVIDIA-AppxPackage-Files.png\" alt=\"NVIDIA AppxPackage Files\" width=\"633\" height=\"387\" srcset=\"https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-content\/uploads\/2024\/07\/NVIDIA-AppxPackage-Files.png 633w, https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-content\/uploads\/2024\/07\/NVIDIA-AppxPackage-Files-300x183.png 300w\" sizes=\"(max-width: 633px) 100vw, 633px\" \/><\/a><\/p>\n<p>To achieve the outcome needed we do two things if the OS Version is 10.0.17763 or greater and driver build is 527.41 or greater:<\/p>\n<ol>\n<li>Post driver install script<\/li>\n<li>User logon script<\/li>\n<\/ol>\n<p><strong>1. Post Driver Install Script<\/strong><\/p>\n<p>I add the following two snippets of code to the driver deployment script to run AFTER the driver has installed.<\/p>\n<p>The first snippet of code will copy the &#8220;new&#8221; Control Panel items back to the &#8220;C:\\Program Files\\NVIDIA Corporation\\Control Panel Client&#8221; folder at the time of installation. This will provide users with familiarity, and continue to allow any 3rd party tools I and others have developed to directly execute these tools.<\/p>\n<pre class=\"brush: powershell; auto-links: false; title: ; toolbar: false; notranslate\" title=\"\">\r\n$NVIDIAControlPanelFolder = $null\r\nTry {\r\n  # We can use either Get-AppxPackage or the Get-ChildItem cmdlet to get the exact installation location of the Appx Package\r\n  $NVIDIAControlPanelFolder = Get-AppxPackage -Name &quot;NVIDIACorp.NVIDIAControlPanel*&quot; | Select-Object -ExpandProperty InstallLocation\r\n  #$NVIDIAControlPanelFolder = Get-ChildItem -Path &quot;${env:ProgramFiles}\\WindowsApps&quot; -ErrorAction &quot;Stop&quot; | Where-object {$_.psIsContainer -eq $true -AND $_.Name -Like &quot;NVIDIACorp.NVIDIAControlPanel*&quot;}  | Select-Object -ExpandProperty FullName\r\n}\r\nCatch &#x5B;System.Exception]{\r\n  write-warning &quot;$($Error&#x5B;0].Exception.Message)&quot; -verbose\r\n}\r\nIf (!(&#x5B;String]::IsNullOrEmpty($NVIDIAControlPanelFolder))) {\r\n  # If we copy it in too quickly after the install, they will be deleted by the nvdisplay.container.exe process as per the following output from the LOG.NVDisplay.Container.exe.log\r\n  #   DEBUG: &#x5B;UXDriver.ApiX.Features.StartupFeatures] 5241@Nvidia::UXDriver::ApiX::Features::StartupFeatures::DeleteControlPanelClient : Entered. \r\n  # The nvdisplay.container.exe gets it's list of default processes from the &quot;HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\nvlddmkm\\Global\\Startup&quot; registry key.\r\n  # The RemoveControlPanelClient subkey is the specific key of concern here.\r\n  #  Key: HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\nvlddmkm\\Global\\Startup\\RemoveControlPanelClient\r\n  #  Type: DWORD\r\n  #  Vale: (Default)\r\n  #  Data: 1\r\n  # Once the 'Default' value is set to 1, you can then copy the control panel files back in and they won't be deleted.\r\n  # The following code simply waits for the value to be set to 1 before proceeding:\r\n  $Key = &quot;HKLM:\\SYSTEM\\CurrentControlSet\\Services\\nvlddmkm\\Global\\Startup\\RemoveControlPanelClient&quot;\r\n  $Value = &quot;(Default)&quot;\r\n  $Data = 1\r\n  Write-Verbose &quot;Checking to see if the RemoveControlPanelClient default value has been set to 1&quot; -Verbose\r\n  $KeyExists = $False\r\n  $ValueExists = $False\r\n  Do {\r\n    $ErrorActionPreference = &quot;stop&quot;\r\n    try {\r\n      Get-Item -Path &quot;$Key&quot; | Out-Null\r\n      $KeyExists = $true\r\n    }\r\n    Catch &#x5B;System.Exception]{\r\n      write-warning &quot;$($Error&#x5B;0].Exception.Message)&quot; -verbose\r\n    }\r\n    $ErrorActionPreference = &quot;Continue&quot;\r\n    If ($KeyExists) {\r\n      $ErrorActionPreference = &quot;stop&quot;\r\n      try {\r\n        If ((Get-ItemProperty -Path &quot;$Key&quot; | Select-Object -ExpandProperty &quot;$Value&quot;) -eq $Data) {\r\n          Write-Verbose &quot;- The RemoveControlPanelClient default value is set to 1.&quot; -Verbose\r\n          $ValueExists = $True\r\n        }\r\n      }\r\n      Catch &#x5B;System.Exception]{\r\n        write-warning &quot;$($Error&#x5B;0].Exception.Message)&quot; -verbose\r\n      }\r\n      $ErrorActionPreference = &quot;Continue&quot;\r\n    }\r\n    If ($ValueExists -eq $False) {\r\n      Write-Verbose &quot;- waiting for the RemoveControlPanelClient default value to change to 1.&quot; -Verbose\r\n      Start-Sleep -Seconds 1\r\n    }\r\n  } Until ($ValueExists -eq $true)\r\n  If (-not(TEST-PATH &quot;${env:ProgramFiles}\\NVIDIA Corporation\\Control Panel Client&quot;)) {\r\n    New-Item -Path &quot;${env:ProgramFiles}\\NVIDIA Corporation\\Control Panel Client&quot; -ItemType Directory | out-null\r\n  }\r\n  If (TEST-PATH &quot;$NVIDIAControlPanelFolder\\nvcplui.exe&quot;) {\r\n    Copy-Item -Path &quot;$NVIDIAControlPanelFolder\\nvcplui.exe&quot; -Destination &quot;${env:ProgramFiles}\\NVIDIA Corporation\\Control Panel Client\\&quot; -Recurse -Force -Verbose\r\n  } Else {\r\n    Write-Warning &quot;The `&quot;$NVIDIAControlPanelFolder\\nvcplui.exe`&quot; file was not found&quot; -verbose\r\n  }\r\n  If (TEST-PATH &quot;$NVIDIAControlPanelFolder\\nvcpluir.dll&quot;) {\r\n    Copy-Item -Path &quot;$NVIDIAControlPanelFolder\\nvcpluir.dll&quot; -Destination &quot;${env:ProgramFiles}\\NVIDIA Corporation\\Control Panel Client\\&quot; -Recurse -Force -Verbose\r\n  } Else {\r\n    Write-Warning &quot;The `&quot;$NVIDIAControlPanelFolder\\nvcpluir.dll`&quot; file was not found&quot; -verbose\r\n  }\r\n  If (TEST-PATH &quot;$NVIDIAControlPanelFolder\\NvGpuUtilization.exe&quot;) {\r\n    Copy-Item -Path &quot;$NVIDIAControlPanelFolder\\NvGpuUtilization.exe&quot; -Destination &quot;${env:ProgramFiles}\\NVIDIA Corporation\\Control Panel Client\\&quot; -Recurse -Force -Verbose\r\n  } Else {\r\n    Write-Warning &quot;The `&quot;$NVIDIAControlPanelFolder\\NvGpuUtilization.exe`&quot; file was not found&quot; -verbose\r\n  }\r\n  If (TEST-PATH &quot;$NVIDIAControlPanelFolder\\NvStereoUtilityOGL.exe&quot;) {\r\n    Copy-Item -Path &quot;$NVIDIAControlPanelFolder\\NvStereoUtilityOGL.exe&quot; -Destination &quot;${env:ProgramFiles}\\NVIDIA Corporation\\Control Panel Client\\&quot; -Recurse -Force -Verbose\r\n  } Else {\r\n    Write-Warning &quot;The `&quot;$NVIDIAControlPanelFolder\\NvStereoUtilityOGL.exe`&quot; file was not found&quot; -verbose\r\n  }\r\n}\r\n<\/pre>\n<p>As documented in the above code, if we copy them in too quickly after the install, they will be deleted by the nvdisplay.container.exe process during it&#8217;s initialisation phase as per the following output from the LOG.NVDisplay.Container.exe.log.<\/p>\n<pre class=\"brush: plain; auto-links: false; gutter: false; title: ; toolbar: false; notranslate\" title=\"\">\r\nDEBUG: &#x5B;UXDriver.ApiX.Features.StartupFeatures] 5241@Nvidia::UXDriver::ApiX::Features::StartupFeatures::DeleteControlPanelClient : Entered.\r\n<\/pre>\n<p>I found that the nvdisplay.container.exe gets its list of default processes from the &#8220;HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\nvlddmkm\\Global\\Startup&#8221; registry key. The RemoveControlPanelClient subkey is the specific key of concern here.<\/p>\n<pre class=\"brush: plain; auto-links: false; gutter: false; title: ; toolbar: false; notranslate\" title=\"\">\r\nKey: HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\nvlddmkm\\Global\\Startup\\RemoveControlPanelClient\r\nType: DWORD\r\nVale: (Default)\r\nData: 1\r\n<\/pre>\n<p>Once the &#8216;Default&#8217; value is set to 1, you can then copy the control panel files back in and they won&#8217;t be deleted again. My code above allows for this.<\/p>\n<p><a href=\"https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-content\/uploads\/2024\/07\/Reinstate-the-Control-Panel-Client-folder.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2952\" src=\"https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-content\/uploads\/2024\/07\/Reinstate-the-Control-Panel-Client-folder.png\" alt=\"Reinstate the Control Panel Client folder\" width=\"516\" height=\"151\" srcset=\"https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-content\/uploads\/2024\/07\/Reinstate-the-Control-Panel-Client-folder.png 516w, https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-content\/uploads\/2024\/07\/Reinstate-the-Control-Panel-Client-folder-300x88.png 300w\" sizes=\"(max-width: 516px) 100vw, 516px\" \/><\/a><\/p>\n<p>The second snippet of code will create a new registry key I made up called&nbsp;NVControlPanelAppXInformation under the &#8220;HKEY_LOCAL_MACHINE\\SOFTWARE\\NVIDIA Corporation&#8221; key which holds some values for the Appx Package, such as Version, PackageFullName, InstallLocation, PackageFamilyName and PublisherId. This allows us to lookup these values on the fly, removing the need to hardcode them in other scripts and tools.<\/p>\n<pre class=\"brush: powershell; auto-links: false; title: ; toolbar: false; notranslate\" title=\"\">\r\n$NVControlPanelAppXInformationKey = &quot;HKLM:\\SOFTWARE\\NVIDIA Corporation\\NVControlPanelAppXInformation&quot;\r\n$NvidiaAppxPackage = $null\r\nTry {\r\n  $NvidiaAppxPackage = Get-AppxPackage -Name &quot;NVIDIACorp.NVIDIAControlPanel*&quot;\r\n}\r\nCatch &#x5B;System.Exception]{\r\n  write-warning &quot;$($Error&#x5B;0].Exception.Message)&quot; -verbose\r\n}\r\nIf ($null -ne $NvidiaAppxPackage) {\r\n  $KeyExists = $False\r\n  $ErrorActionPreference = &quot;stop&quot;\r\n  try {\r\n    Get-Item -Path &quot;$NVControlPanelAppXInformationKey&quot; | Out-Null\r\n    $KeyExists = $true\r\n  }\r\n  catch {\r\n    #\r\n  }\r\n  $ErrorActionPreference = &quot;Continue&quot;\r\n  If ($KeyExists -eq $False) {\r\n    New-Item -Path &quot;$NVControlPanelAppXInformationKey&quot; -Force | Out-Null\r\n  }\r\n  write-verbose &quot;Setting values under the `&quot;$($NVControlPanelAppXInformationKey.Replace(':',''))`&quot; registry key...&quot; -verbose\r\n  write-verbose &quot;- Version: $($NvidiaAppxPackage.Version)&quot; -verbose\r\n  Set-ItemProperty -Path &quot;$NVControlPanelAppXInformationKey&quot; -Name Version -Type String -Value $NvidiaAppxPackage.Version -Force\r\n  write-verbose &quot;- PackageFullName: $($NvidiaAppxPackage.PackageFullName)&quot; -verbose\r\n  Set-ItemProperty -Path &quot;$NVControlPanelAppXInformationKey&quot; -Name PackageFullName -Type String -Value $NvidiaAppxPackage.PackageFullName -Force\r\n  write-verbose &quot;- InstallLocation: $($NvidiaAppxPackage.InstallLocation)&quot; -verbose\r\n  Set-ItemProperty -Path &quot;$NVControlPanelAppXInformationKey&quot; -Name InstallLocation -Type String -Value $NvidiaAppxPackage.InstallLocation -Force\r\n  write-verbose &quot;- PackageFamilyName: $($NvidiaAppxPackage.PackageFamilyName)&quot; -verbose\r\n  Set-ItemProperty -Path &quot;$NVControlPanelAppXInformationKey&quot; -Name PackageFamilyName -Type String -Value $NvidiaAppxPackage.PackageFamilyName -Force\r\n  write-verbose &quot;- PublisherId: $($NvidiaAppxPackage.PublisherId)&quot; -verbose\r\n  Set-ItemProperty -Path &quot;$NVControlPanelAppXInformationKey&quot; -Name PublisherId -Type String -Value $NvidiaAppxPackage.PublisherId -Force\r\n}\r\n<\/pre>\n<p><a href=\"https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-content\/uploads\/2024\/07\/NVControlPanelAppXInformation-key-and-values.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-2944\" src=\"https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-content\/uploads\/2024\/07\/NVControlPanelAppXInformation-key-and-values-680x146.png\" alt=\"NVControlPanelAppXInformation key and values\" width=\"680\" height=\"146\" srcset=\"https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-content\/uploads\/2024\/07\/NVControlPanelAppXInformation-key-and-values-680x146.png 680w, https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-content\/uploads\/2024\/07\/NVControlPanelAppXInformation-key-and-values-300x64.png 300w, https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-content\/uploads\/2024\/07\/NVControlPanelAppXInformation-key-and-values-768x165.png 768w, https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-content\/uploads\/2024\/07\/NVControlPanelAppXInformation-key-and-values.png 1141w\" sizes=\"(max-width: 680px) 100vw, 680px\" \/><\/a><\/p>\n<p><strong>2. User Logon Script<\/strong><\/p>\n<p>Even though we have re-instated the original Control Panel folder structure, we still register the new NVIDIA Control Panel Appx Package per user as NVIDIA would expect us to do. This ensures we have all bases covered from a usability and supportability point of view.<\/p>\n<p>The script will also accept the NVIDIA Control Panel EULA and enables the Control Panel from the Desktop Context Menu.<\/p>\n<p>Here is the <a  data-e-Disable-Page-Transition=\"true\" class=\"download-link\" title=\"\" href=\"https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/download\/2930\/?tmstv=1779555932\" rel=\"nofollow\" id=\"download-link-2930\" data-redirect=\"false\" >\n\tAdd NVIDIA Control Panel\t(1057 downloads\t)\n<\/a>\n script that registers the Appx Package per user.<\/p>\n<pre class=\"brush: powershell; auto-links: false; title: ; toolbar: false; notranslate\" title=\"\">\r\n&lt;#\r\n  This script will add the NVIDIA Control Panel Appx Package\r\n\r\n  References:\r\n  - https:\/\/www.vjonathan.com\/post\/dem-non-persistent-vdi-deployment-and-nvidia-control-panel-missing\/\r\n  - https:\/\/support.citrix.com\/s\/article\/CTX493226-nvidia-control-panel-is-not-found-in-random-vda-with-upm-policy-applied?language=en_US\r\n  - https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/2024\/07\/14\/restoring-the-nvidia-control-panel-and-tools-after-the-appx-package-change-2903\r\n\r\n  We get the PackageFullName value for the Appx Package from the &quot;HKEY_LOCAL_MACHINE\\SOFTWARE\\NVIDIA Corporation\\NVControlPanelAppXInformation&quot;\r\n  registry key. This is set as a post install part of the driver installation process.\r\n\r\n  Accept the NVIDIA Control Panel EULA\r\n    Key: HKEY_CURRENT_USER\\SOFTWARE\\NVIDIA Corporation\\NVControlPanel2\\Client\r\n    Type: REG_DWORD\r\n    Value: ShowSedoanEula\r\n    Data: 1\r\n\r\n  Add NVIDIA Control Panel to the Desktop Context Menu\r\n    Key: HKEY_CURRENT_USER\\SOFTWARE\\NVIDIA Corporation\\Global\\NvCplApi\\Policies\r\n    Type: REG_DWORD\r\n    Value: ContextUIPolicy\r\n    Data: 2\r\n\r\n  Script name: Add-NVIDIA_Control_Panel.ps1\r\n  Release 1.0\r\n  Written by Jeremy Saunders (jeremy@jhouseconsulting.com) 6th May 2024\r\n\r\n#&gt;\r\n\r\n#-------------------------------------------------------------\r\n\r\n# Set Powershell Compatibility Mode\r\nSet-StrictMode -Version 2.0\r\n\r\n# Enable verbose, warning and error mode\r\n$VerbosePreference = 'Continue'\r\n$WarningPreference = 'Continue'\r\n$ErrorPreference = 'Continue'\r\n\r\n#-------------------------------------------------------------\r\n\r\n$StartDTM = (Get-Date)\r\n\r\n# Set the working folder to the users TEMP folder\r\n$LogFolder = &#x5B;System.IO.Path]::GetTempPath()\r\n\r\n# Get the script name\r\n$ScriptName = &#x5B;System.IO.Path]::GetFilenameWithoutExtension($MyInvocation.MyCommand.Path.ToString())\r\n\r\n# Start the transcript\r\ntry {\r\n  Start-Transcript &quot;$LogFolder$ScriptName.log&quot;\r\n}\r\ncatch {\r\n  write-verbose &quot;$(Get-Date): This host does not support transcription&quot;\r\n}\r\n\r\n#-------------------------------------------------------------\r\n\r\n# The DCH (Declarative Componentized Hardware) driver model started from GRID 15.0 (527.41)\r\n&#x5B;float]$StartingVersion = 527.41\r\n\r\n#-------------------------------------------------------------\r\n\r\nFunction Create-RegKey {\r\n  param (\r\n         &#x5B;String]$Path\r\n        )\r\n  $KeyExists = $False\r\n  $ErrorActionPreference = &quot;stop&quot;\r\n  try {\r\n    Get-Item -Path &quot;$Path&quot; | Out-Null\r\n    $KeyExists = $true\r\n  }\r\n  catch {\r\n    #\r\n  }\r\n  $ErrorActionPreference = &quot;Continue&quot;\r\n  If ($KeyExists -eq $False) {\r\n    write-verbose &quot;Creating the `&quot;$Path`&quot; registry key&quot; -verbose\r\n    New-Item -Path &quot;$path&quot; -Force | Out-Null\r\n  }\r\n}\r\n\r\nFunction Create-RegValue {\r\n  param (\r\n         &#x5B;String]$Path,\r\n         &#x5B;String]$Value,\r\n         &#x5B;String]$Data,\r\n         &#x5B;String]$Type\r\n        )\r\n  $ValueExists = $False\r\n  $ErrorActionPreference = &quot;stop&quot;\r\n  try {\r\n    If ((Get-ItemProperty -Path &quot;$Path&quot; | Select-Object -ExpandProperty &quot;$Value&quot;) -ne $null) {\r\n      $ValueExists = $True\r\n    }\r\n  }\r\n  catch {\r\n    #\r\n  }\r\n  $ErrorActionPreference = &quot;Continue&quot;\r\n  If ($ValueExists) {\r\n    write-verbose &quot;- Setting the $Value registry value&quot; -verbose\r\n    Set-ItemProperty -Path &quot;$Path&quot; -Name &quot;$Value&quot; -Type $Type -Value $Data  Force\r\n  } Else {\r\n    write-verbose &quot;- Creating the $Value registry value&quot; -verbose\r\n    New-ItemProperty -Path &quot;$Path&quot; -Name &quot;$Value&quot; -PropertyType $Type -Value $Data | Out-Null\r\n  }\r\n}\r\n\r\n#-------------------------------------------------------------\r\n\r\n$PackageFullName = &quot;&quot;\r\n$ErrorActionPreference = &quot;stop&quot;\r\nTry {\r\n  $PackageFullName = (Get-ItemProperty -Path &quot;HKLM:\\SOFTWARE\\NVIDIA Corporation\\NVControlPanelAppXInformation&quot; -Name PackageFullName).PackageFullName\r\n}\r\nCatch &#x5B;System.Exception]{\r\n  write-warning &quot;$($Error&#x5B;0].Exception.Message)&quot; -verbose\r\n}\r\n$ErrorActionPreference = &quot;Continue&quot;\r\n\r\n&#x5B;float]$DriverVersion = 0.00\r\nTry {\r\n  If (TEST-PATH &quot;${env:SystemRoot}\\System32\\nvidia-smi.exe&quot;) {\r\n    $DriverVersion = &amp; &quot;${env:SystemRoot}\\System32\\nvidia-smi.exe&quot; --query-gpu=driver_version --format=csv,noheader\r\n  }\r\n}\r\nCatch &#x5B;System.Exception]{\r\n  write-warning &quot;$($Error&#x5B;0].Exception.Message)&quot; -verbose\r\n}\r\n\r\nIf ($DriverVersion -ge $StartingVersion) {\r\n  write-verbose &quot;Driver $($DriverVersion.ToString()) is a DCH (Declarative Componentized Hardware) driver and uses the Control Panel Appx Package&quot; -verbose\r\n  If (!(&#x5B;String]::IsNullOrEmpty($PackageFullName))) {\r\n    Try {\r\n      write-verbose &quot;Registering the existing NVIDIA Control Panel Appx Package from the `&quot;${env:ProgramFiles}\\WindowsApps\\$PackageFullName$PackageFullName`&quot; folder&quot; -verbose\r\n      Add-AppxPackage -Register &quot;${env:ProgramFiles}\\WindowsApps\\$PackageFullName\\AppxManifest.xml&quot; -DisableDevelopmentMode\r\n    }\r\n    Catch &#x5B;System.Exception]{\r\n      write-warning &quot;$($Error&#x5B;0].Exception.Message)&quot; -verbose\r\n    }\r\n  } Else {\r\n    write-warning &quot;Unable to register the NVIDIA Control Panel Appx Package because the PackageFullName was not set.&quot; -verbose\r\n  }\r\n}\r\n\r\n#-------------------------------------------------------------\r\n\r\n# Accept the NVIDIA Control Panel EULA\r\nCreate-RegKey -Path:&quot;HKCU:\\SOFTWARE\\NVIDIA Corporation\\NVControlPanel2\\Client&quot;\r\nCreate-RegValue -Path:&quot;HKCU:\\SOFTWARE\\NVIDIA Corporation\\NVControlPanel2\\Client&quot; -Value:&quot;ShowSedoanEula&quot; -Data:1 -Type:DWORD\r\n\r\n# Add NVIDIA Control Panel to the Desktop Context Menu\r\nCreate-RegKey -Path:&quot;HKCU:\\SOFTWARE\\NVIDIA Corporation\\Global\\NvCplApi\\Policies&quot;\r\nCreate-RegValue -Path:&quot;HKCU:\\SOFTWARE\\NVIDIA Corporation\\Global\\NvCplApi\\Policies&quot; -Value:&quot;ContextUIPolicy&quot; -Data:2 -Type:DWORD\r\n\r\n#-------------------------------------------------------------\r\n\r\nWrite-Verbose &quot;Stop logging&quot; -Verbose\r\n$EndDTM = (Get-Date)\r\nWrite-Verbose &quot;Elapsed Time: $(($EndDTM-$StartDTM).TotalSeconds) Seconds&quot; -Verbose\r\nWrite-Verbose &quot;Elapsed Time: $(($EndDTM-$StartDTM).TotalMinutes) Minutes&quot; -Verbose\r\n\r\n# Stop the transcript\r\ntry {\r\n  Stop-Transcript\r\n}\r\ncatch {\r\n  write-verbose &quot;$(Get-Date): This host does not support transcription&quot;\r\n}\r\n<\/pre>\n<p><strong>References:<\/strong><\/p>\n<ul>\n<li><a href=\"https:\/\/enterprise-support.nvidia.com\/s\/article\/The-NVIDIA-Control-Panel-app-is-not-installed\" target=\"_blank\">NVIDIA Enterprise Support Article Number 4730:&nbsp;NVIDIA Control Panel not found on System<\/a><\/li>\n<li>Jonathan Carraro (AKA vJonathan) published an article on 19th Feb 2023: <a href=\"https:\/\/www.vjonathan.com\/post\/dem-non-persistent-vdi-deployment-and-nvidia-control-panel-missing\/\" target=\"_blank\">DEM: Non-Persistent VDI Deployment and NVIDIA Control Panel Is Not Found<\/a><\/li>\n<li>NVIDIA bug #4644253<\/li>\n<\/ul>\n<p><strong>Summary<\/strong><\/p>\n<p>The solution I&#8217;ve provided respects both Microsoft and NVIDIA support, allowing you to continue as business as usual. As you may tell, I&#8217;m not overly impressed with what NVIDIA have done here. Hopefully someone from NVIDIA will read this article and see that what they&#8217;ve created is not ideal.<\/p>\n<p>Hope you find this helpful.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Updated 12th August 2024: Post install code snippets updated Article wording updated With the move from the Standard driver model to the DCH (Declarative Componentized Hardware) driver model implemented from GRID 15.0 (Windows driver version 527.41) and above, the NVIDIA Control Panel app is now distributed through the Microsoft Store as an Appx Package. Even &#8230; <a title=\"Restoring the NVIDIA Control Panel and Tools after the Appx Package Change\" class=\"read-more\" href=\"https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/2024\/07\/14\/restoring-the-nvidia-control-panel-and-tools-after-the-appx-package-change-2903\" aria-label=\"Read more about Restoring the NVIDIA Control Panel and Tools after the Appx Package Change\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[23,727,717,659,5],"tags":[749,751,720,721,753,746,747,725,723,724,728,718,719,748,722,752,726,750],"class_list":["post-2903","post","type-post","status-publish","format-standard","hentry","category-applications","category-gpu","category-nvidia","category-powershell","category-scripting","tag-appx","tag-appxmanifest-xml","tag-bug-4644253","tag-case-00697597","tag-contextuipolicy","tag-dch","tag-declarative-componentized-hardware","tag-deletecontrolpanelclient","tag-hkey_local_machinesystemcurrentcontrolsetservicesnvlddmkmglobalstartupremovecontrolpanelclient","tag-hklmsystemcurrentcontrolsetservicesnvlddmkmglobalstartupremovecontrolpanelclient","tag-nvcontrolpanelappxinformation","tag-nvcplui-exe","tag-nvgpuutilization-exe","tag-nvidia","tag-removecontrolpanelclient","tag-showsedoaneula","tag-startupfeatures","tag-windowsapps"],"aioseo_notices":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-json\/wp\/v2\/posts\/2903","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-json\/wp\/v2\/comments?post=2903"}],"version-history":[{"count":4,"href":"https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-json\/wp\/v2\/posts\/2903\/revisions"}],"predecessor-version":[{"id":3175,"href":"https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-json\/wp\/v2\/posts\/2903\/revisions\/3175"}],"wp:attachment":[{"href":"https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-json\/wp\/v2\/media?parent=2903"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-json\/wp\/v2\/categories?post=2903"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jhouseconsulting.com\/jhouseconsulting\/wp-json\/wp\/v2\/tags?post=2903"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}