Totally guessing now, but this is what I would do in such a case: 0. (Mandatory part): Determine which line of the script is failing and concentrate on those line(s). 1. Examine the privileges of the registry keys (while running regedit as Trusted Installer) 2. Stop EvenLog service temporarily and then try changing the values again. Maybe stop some other services, to check which ones see below: 3. Check with ProcessExplorer who has open handles to those registry keys. 4. Edit the registry offline, from Windows PE or from another computer. GL