The operating system, drivers, and device installation components store information about drivers and devices in the registry. In general, drivers and device installation components should use the registry to store data that must be maintained across restarts of the system. For information about how a driver accesses registry information, see Using the Registry in a Driver.
Registry contents should always be treated as untrusted, modifiable information. If one of your driver components writes information to the registry and another component reads it later, do not assume that the information has not been modified in the meantime. After reading information from the registry, your driver components should always validate the information before using it.
Drivers must access Plug and Play (PnP) keys in the registry using system routines such as IoGetDeviceProperty or IoOpenDeviceRegistryKey. User-mode setup components should use device installation functions such as CM_Get_DevNode_Registry_Property or CM_Open_DevNode_Key. The registry can be accessed from INF files by using INF AddReg directives. See the registry state section of the driver package isolation page for more information.
16 port USB Virtual COM PORT Hub that assigns non sequential com ports when plugged in. When I look at the device manager General Tab it shows the physical location of the assigned port next to the Location description.
Is there way to retrieve this property using the property node of the visa resource?? I can retrieve all the com ports and filter by the manufacuter so I get all 16 com ports, the problem is I don't know what physical port is talking to the virtual port.. I can manually edit the com ports in device manager and re-arrange the orders so that they are sequential, but would rather do programmatically if possible..
I deleted the key in registry (suggestion that I found on many places) and that did not work until I amended the key by deleting "\??\" with which the ImagePath started; uninstalling and installing AMD Ryzen Master in the end leaves me with two almost identical registry keys (both with an ImagePath starting with "\??\") one 'AMDRyzenMasterDriver' and one 'AMDRyzenMasterDriverV19'. Apparently these are automatically generated upon restart and/or reinstallation and the one does not go without the other and AMD Ryzen Master now works fine.
However, I also noticed that in Device Manager > System Devices the device listed under 'AMD RyzenMaster Device' (if I recall correctly) was showing troubles (triangle/exclamation mark, error 19 with reference to a wrong registry entry) and I decided to uninstall it assuming it would be re-established after another uninstall/reinstall of AMD Ryzen Master; however, it did not also not with a scan for new hardware (and is also not hidden).
So, considering all the steps and troubles I went through with not alternatives or options left I did not already try the only thing I can do is keep a sharp eye on the issue and launch AMDRyzenMaster regularly (at least after every reboot) to try and find a pattern.
The AMDRyzenMaster application (version 2.8.0.1937) installs in folder 'C:\Program Files\AMD\RyzenMaster\bin\' it contains the file AMDRyzenMasterDriver.sys version 1.9.0.0 size 42,3 KB. The corresponding registry key 'AMDRyzenMasterDriver' calls an ImagePath to folder '\??\C:\Program Files\AMD\Performance Profile Client\' which also contains a file AMDRyzenMasterDriver.sys version 1.9.0.0 size 42,3 KB. This registry key cannot be deleted (rebuilds on reboot).
Device Manager lists under System devices the item AMDRyzenMaster Device with Driver version 1.5.0.0 and the Service AMDRyzenMasterDriverV15; this relates to a registry key 'AMDRyzenMasterDriverV15' which calls an ImagePath to folder '\SystemRoot\system32\DRIVERS\' which contains a file AMDRyzenMasterDriver.sys version 1.5.0.0 size 68,2 KB. This registry key can be deleted an so can the AMDRyzenMaster Device.
somewhat more research: opened Device Manager > AMDRyzenMaster Device > update driver > folder: 'C:\Program Files\AMD\RyzenMaster\bin\' and the driver updates from 1.5.0.0 to 1.9.0.0 . Additionally a new registry key is produced 'AMDRyzenMasterDriverV19', whilst the key 'AMDRyzenMasterDriverV15' remains to exist (will decide to eliminate it later).
I solved the issue by uninstalling Ryzen Master then using AMD cleanup utility. While in safe boot I deleted both entries in the registry and deleted both AMDRyzenMasterDriver.sys files from Performance Profile Client & System32 folders respectively
I'm trying to automate via PowerShell a number of time consuming tasks that I have to preform to make a new VM template, one of which is removing all of the NICs from the VM and cleaning up the Device Manager of non present devices.
After removing the NICs from the VM, I've tried using the following code snippets, which do the same thing, to clean up Device Manager.
In both cases I receive the error "Provider is not capable of the attempted operation". Reviewing the event logs for WMI-Activity didn't seem to help: ResultCode = 0x80041024; PossibleCause = Unknown.
EDIT: I've tried using DevCon to remove the device, but it seems to only work with present devices. I'm now combing through the registry to see if there is a specific key or set of keys that if removed would remove the NIC from Device Manager.
NOTE: Your list of adapters at step 1 must ONLY contain adapters you want to purge. If you have extras in there, adjust the filter (? Status -eq XXX, eg: ? FriendlyName -like "Broadcom*") accordingly!
This will ask for confirmation for each device before the removal, the -Force option can suppress this behaviour. Without any option the script will remove all hidden devices which sounds like something the questioner also interested in.
This registry key contains all of the hardware settings of the machine within the registry:
HKEY_LOCAL_MACHINE\system\currentcontrolset\enum
First query the present and enabled Network Adapters through WMI and get their PNPDeviceId. This value will tell you which subkey the Network Adapters are located in.
Next query the registry for each subkey and find all of the Adapters. Parse the full registry key to cut down to the same length as the PNPDeviceId values; roughly PCI\VEN_80AD&DEV_15A2&SUBSYS_062D1028&REV_02\2&11483669&0&C9.
Compare the two lists and find any orphaned registry keys. Once found, deleting the registry keys by enumerating the system account will remove the Network Adapter from Device Manager. I used PSExec.exe to run the reg delete command as the system account.
Here is some code to perform what I just explained.