This worked fine for me. I'm calling the script from a batch file. The only problem I had before modifying those 2 registry keys was using INGROUP.