Okay, I have a really simple script. It runs from local storage just fine, but from a network locaiton, it fails with no error.
The batch file backup up a reg key, then calls a .reg to remove the offending key.
Having the script pause at each step reveals no errors.
Like I said, run it locally, it works, run it from a network location it silently fails. One note, when run locally it creates a new .reg for the undo in the folder with the existing .reg below and teh existing .bat below. From a network location it creates no new .reg. I'm not sure if it needs a place to stick the new .reg, but I don't know how to give it a target in the script.
rem first, back up the registry key so it can later be restore.
Regedit.exe /e HCP_Protocol_Backup.reg HKEY_CLASSES_ROOT\HCP
rem next, remove the vulnerable registry key.
Regedit.exe /s HCP.reg
rem finally, restore the vulnerable key one the vendor patch is avaiable
rem Regedit.exe /s HCP_Protocol_Backup.reg
Contents of HCP.reg are as follows...
Windows Registry Editor Version 5.00