Fix ERROR_KEY_HAS_CHILDREN (0x3FC) when creating registry symlink
You get this error when trying to create a symlink in a registry key that already has subkeys or values. Here's the fix.
You'll see ERROR_KEY_HAS_CHILDREN (0x000003FC) when you or a script tries to create a symbolic link in a registry key that already has subkeys or values. I've seen this most often during printer driver installations—specifically when a third-party installer attempts to redirect a registry path like HKLM\SYSTEM\CurrentControlSet\Enum\USB\VID_XXXX to a different location, but that key already contains hardware-specific subkeys from a previous device connection.
Why this happens
Registry symbolic links (introduced in Windows Vista) let you point one key to another. But there's a hard rule: you can't create a symlink in a key that already has any subkeys or named values. The registry engine won't let you because Windows would have no way to decide whether to follow the link or read the existing data. It's a safety check, not a bug.
In the printer scenario, the old USB device entry has child keys like Device Parameters, Properties, and LogConf. When the new driver tries to replace that branch with a symlink pointing to the updated driver store, Windows blocks it with this error.
How to fix it
- Open Regedit as administrator. Hit Windows+R, type
regedit, right-click it, and choose "Run as administrator". If you don't do this, you'll get access denied instead. - Navigate to the key you want to make a symlink. For example:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB\VID_XXXX. You'll see it has subkeys or a (Default) value—that's the problem. - Back up the key first. Right-click the key, choose "Export", save the .reg file somewhere safe. This is your safety net if something goes wrong.
- Delete all subkeys and values inside that key. You must remove every child key and every named value. The key must be completely empty except for the (Default) value, which you can leave or delete—Windows will recreate it when you create the symlink. Right-click each subkey and choose "Delete". For values, right-click them and choose "Delete".
- Verify the key is empty. Click on the key. The right pane should show only a (Default) value with no data set (it'll say "value not set"). If you see anything else, delete it.
- Create the symbolic link. You can't do this from Regedit directly. Use PowerShell as administrator. Run this command, replacing the paths with your actual source and target:
Wait—that's not right for an existing key. You actually need to use theNew-Item -Path "HKLM:\SYSTEM\CurrentControlSet\Enum\USB\VID_XXXX" -Name "YourLinkName" -Type SymbolicLink -Value "HKLM:\SYSTEM\CurrentControlSet\Enum\USB\VID_YYYY"regcommand or the Win32 API. Here's the proper PowerShell approach using .NET:$source = "HKLM\SYSTEM\CurrentControlSet\Enum\USB\VID_XXXX" $target = "HKLM\SYSTEM\CurrentControlSet\Enum\USB\VID_YYYY" [Microsoft.Win32.Registry]::SetValue($source, "SymbolicLink", $target, [Microsoft.Win32.RegistryValueKind]::String) # But this creates a value, not a symlink. For real symlink creation, use a tool like symlink.exe or the Windows API directly.Simpler method: Use the
reglncommand-line tool from the Windows SDK, or if you have Windows 10/11 Pro or Enterprise, you can usefsutil(though it's for file symlinks, not registry). For registry symlinks, I recommend usingSymLink.exefrom Sysinternals or writing a small C# program. Here's the quickest way with a free tool:- Download Sysinternals Suite from Microsoft.
- Run
regln.exeas administrator with this command:
This creates a symbolic link from the empty key to the target key.regln.exe "HKLM\SYSTEM\CurrentControlSet\Enum\USB\VID_XXXX" "HKLM\SYSTEM\CurrentControlSet\Enum\USB\VID_YYYY"
- Check it worked. Open Regedit back up. The key you emptied should now have a small shortcut arrow overlay on its folder icon. Expand it—you should see the contents of the target key.
What if it still fails?
If you still get the error after clearing all children, check these:
- Did you miss a hidden subkey? Some registry keys have hidden empty subkeys that don't show up in the left pane if you're not viewing all keys. Right-click the key and choose "Find" with no search string—it'll cycle through subkeys. Delete any it finds.
- Are you on a 64-bit system? If you're creating a symlink in a 32-bit registry view (under Wow6432Node), you need to use the 32-bit version of regln. Otherwise it'll use the wrong path.
- Permission issues? Even as admin, some keys under
HKLM\SAMorHKLM\SECURITYare protected by TrustedInstaller. UsePsExec -s -i regeditto run as SYSTEM, or take ownership first. - The target key doesn't exist yet? The symlink target must already exist. If you're linking to a key that hasn't been created, you'll get a different error (file not found). Create the target key first.
- Using an old tool? Registry symlinks require Windows Vista or later. If you're on Windows XP or Server 2003, this error won't occur because the feature doesn't exist—you'll get a different error.
One last thing: if you're doing this for a printer driver fix, consider whether a symlink is really what you need. Often, just deleting the old device entry from Device Manager (View > Show hidden devices) and reinstalling the driver accomplishes the same thing without touching the registry directly.
Was this solution helpful?