When you want to run REGEDIT in batch, use the /S switch to avoid the need to respond OK.

Remember that REGEDIT is the Windows 95 editor. It can be used in Windows NT but only for data types REG_SZ and REG_DWORD.

A better batch solution is to use REG.EXE from

or the freeware REG from tip 170.