Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

 
 
Thread Tools Display Modes
Prev Previous Post in Thread   Next Post in Thread Next
Old Mar 15th, 2005, 11:18 AM   #1
dpasswat
Newbie
 
Join Date: Mar 2005
Location: Huntsville, AL
Posts: 2
Rep Power: 0 dpasswat is on a distinguished road
Update registry key value via batch file

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.
dpasswat is offline   Reply With Quote
 

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 12:21 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC