473,473 Members | 2,232 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Editing a registry key value in a batch file

I've built a screen saver in C#. Now I'm trying to load it and make it the
current screen saver. I found the tegistry key that needs to be changed,
but I can't seem to change it via batch file. Can soneone please help me.
Here's what I have 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 Value:C:\WINDOWS\System32\MBSCRN~1.SCR

REG QUERY RegistryPath ['HKEY_CURRENT_USER\Control\Panel\Desktop\
SCRNSAVE.EXE'] [/S] [/size][/list]
REG UPDATE RegistryPath = C:\WINDOWS\System32\MBSCRN~1.SCR

Thanks in advance for any help.

--
Message posted via http://www.dotnetmonster.com
Nov 16 '05 #1
0 1345

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: rdavis7408 | last post by:
I have a database that has a form that opens a report using date parameters. I have been using it for six months and last week I began to get the following Error Message: "File sharing lock...
1
by: Adnan Selimovic | last post by:
Hi folks! I have Framework 1.0 installed and I would like to point to registry from my Web.config file: <connectionString> <add key="password" value="registry:HKLM\Software\Foo,password" />...
1
by: bg_ie | last post by:
Hi, I created a COM object using C# and I installed it with a batch that looks something like this - ECHO OFF PATH = C:\WINNT\Microsoft.NET\Framework\v2.0.50727 set target=C:\mydll.dll echo...
0
by: neo3114 | last post by:
Hi, Can anyone tell me how using reg.exe i can check if i a registry key exists in a batch file and fail if it does. i assume its a for statement and followed by if but just cant get the...
1
by: jacy.york | last post by:
Does anyone know how to detect the final character in a variable. I am trying to pass a path from the registry to a command prompt however the format of the registry value contains an invalid...
2
by: rodpolako | last post by:
Hi everyone, I am trying to write a program that can make some changes into a windows XP registry. My program works great when it is working on the local registry. What I want to do is to be...
1
by: hameeduddinasim | last post by:
Hi guy's I have a batch file which return's me the string output I success to execute the batch file from C#.Net, but unable to capture return value, I need that return string to be use in rest...
3
by: Rafath | last post by:
Hello iam new to this forum but i hope this will help me in solving the case The error iam getting is "Registry editing has been disabled please contact your system administrator" mines is a...
4
AnuSumesh
by: AnuSumesh | last post by:
Hi, One of our customer has following requirement: When user login to web site, some key should be added to client side registry and when he logs off, then that key should be deleted from...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.