I've written a screen saver, and I'm trying to make it the current screen with a batch file. I can do all of the file stuff, but I'm having trouble updating the registry. BTW: I am in admin mode. My code so far:
cls
del MBScrnSvr.scr
ren MBScrnSvr.exe MBScrnSvr.scr
IF NOT EXIST c:\Windows\system32\MBScrnSvr.scr GOTO INSTALL_SCRNSVR_END
del c:\Windows\system32\MBScrnSvr.scr
:INSTALL_SCRNSVR_END
copy MBScrnSvr.scr c:\Windows\system32\
rem key: HKEY_CURRENT_USER\Control Panel\Desktop\SCRNSAVE.EXE
rem Key value: C:\WINDOWS\System32\MBSCRN~1.SCR
HKEY_CURRENT_USER\Control Panel\Desktop "SCRNSAVE.EXE" = -
HKEY_CURRENT_USER\Control Panel\Desktop "SCRNSAVE.EXE" = -s C:\WINDOWS\System32\MBSCRN~1.SCR
Thanks.