473,549 Members | 2,862 Online
Bytes | Software Development & Data Engineering Community
+ 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\syst em32\MBScrnSvr. scr GOTO INSTALL_SCRNSVR _END
del c:\Windows\syst em32\MBScrnSvr. scr
:INSTALL_SCRNSV R_END

copy MBScrnSvr.scr c:\Windows\syst em32\

REM Key: HKEY_CURRENT_US ER\Control Panel\Desktop\S CRNSAVE.EXE
REM Value:C:\WINDOW S\System32\MBSC RN~1.SCR

REG QUERY RegistryPath ['HKEY_CURRENT_U SER\Control\Pan el\Desktop\
SCRNSAVE.EXE'] [/S] [/size][/list]
REG UPDATE RegistryPath = C:\WINDOWS\Syst em32\MBSCRN~1.S CR

Thanks in advance for any help.

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

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

Similar topics

1
16301
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 count exceeded. Increase MaxLocksPerFile registry entry." I checked in the Tools - Options - Advance. I have the database shared with no locks...
1
2562
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" /> <add key="userID" value="registry:HKLM\Software\Foo,userID" /> <add key="initialCatalog" value="registry:HKLM\Software\Foo,initialCatalog" /> <add...
1
7173
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 * Unregister %target% with v2.0.50727 regasm.exe /u %target%
0
2591
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 statement right. i am only interested in the full key not a value or anything so if hlkm\software\microsoft\example exists then go to end of file...
1
993
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 character for the batch process I'm trying to run. Does anyone know how I can detect the value and change it to a valid format.
2
2029
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 able to make changes into a registry that resides on another partition or harddrive, not over a network. Basically, I want to plug in a second hard...
1
2129
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 of my application System.Diagnostics.Process proc = new System.Diagnostics.Process(); proc.EnableRaisingEvents = false;
3
4008
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 standalone computer and there is noh policy mentioned as iam sure of. and also have symantec antivirus software so i think it may be the prob. with the...
4
2844
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 registry. I know that editing client side registry is not safe but our client has this requirement. Can anyone please help me how can we edit client...
0
7518
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7715
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7956
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7469
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6040
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5087
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3498
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3480
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1057
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.