I've encountered an interesting problem in Windows 10. It seems that I can't run any registry scripts from a network drive at the moment. I thought it only affected .reg files that modified HKLM at first, but it's all of them now.
This happens regardless of whether they are run directly or called by a batch script. I end up with an error like this one:
However, if I copy it to the computer, then the file works perfectly and it successfully modifies the Registry.
On this Microsoft TechNet page, someone provided the following information:
This error message can occur if the .reg file is located in a folder whose name contains spaces.
It then links to a Microsoft KB support page that (like all of them now) is dead.
Yet, that answer is bogus. I renamed the folder hierarchy so no spaces existed in the full path. The same error occurred.
I created a folder on the computer with many spaces, and the registry file copied into it still worked with no issues. So, spaces are irrelevant.
What else could be preventing me from executing them? Earlier, I enabled the EnableLinkedConnections registry setting in an attempt to allow the admin token to access mapped drives. Not only did that work, but coincidentally I am now unable to run any registry scripts from the
Z: drive. Previously, I could execute scripts that modified
HKCU and they would work just fine; now, I cannot execute anything.