|
-
September 2nd, 2004, 04:12 AM
#1
Junior Member
batch help (registry).
Hi, I'm hoping some of you will be able to help me out. I'm attempting to create a batch (or .reg if possible) file that will modify a handful of keys in the registry.
Here's one I'm working on:
reg add \HKLM\SOFTWARE\Microsoft\Ole /v EnableDCOM /t REG_SZ /d N
When I run this as a .bat, I get this error:
"Error: Invalid Key Name"
When I change the extension to a .reg and run it, I get this error:
"The specified file is not a registy script. You can only import binary registry files from within the registry editor."
I've looked at the MS help page and I think I've done it how they've explained to.
What all am I doing wrong? I'm not wholly opposed to contrasting methods either, so any suggestions are more than welcome. I'm just looking for the same outcome; automation through a batch file, whether the filename be .reg or .bat. 
Thanks in advance.
-
September 2nd, 2004, 05:50 AM
#2
I think its just the way you're doing it...
I call the .reg from my batch file
http://www.robvanderwoude.com/regedit.html
the .reg should be in the following format
http://www.jsiinc.com/SUBF/TIP2700/rh2750.htm
That *should* work for you... unless I'm not understanding what you're trying to do.
Quitmzilla is a firefox extension that gives you stats on how long you have quit smoking, how much money you\'ve saved, how much you haven\'t smoked and recent milestones. Very helpful for people who quit smoking and used to smoke at their computers... Helps out with the urges.
-
September 3rd, 2004, 12:04 AM
#3
Junior Member
Hey thanks, man, I'm starting to get somewhere here now.
Ok, I took this .reg and placed it in a folder of my choice on the drive:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\Software\Microsoft\Ole]
"EnableDCOM"="N"
Then, I ran this .bat file:
REGEDIT "C:\Documents and Settings\username\path\filename.reg"
.... and it worked! Heheh.
Thanks again, if I have more inquiries I'll be sure to post back.
-
September 3rd, 2004, 02:09 AM
#4
Junior Member
Ok, I've managed to get two of the three that I wanted to work so far.
1.)
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\Software\Microsoft\Ole]
"EnableDCOM"="N"
Using: REGEDIT "C:\Documents and Settings\username\path\filename.reg"
2.)
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NetBT\Parameters]
"TransportBindName"=""
Using: REGEDIT "C:\Documents and Settings\username\path\filename.reg"
__
The third and final registry key I want to change is this one:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Rpc\DCOM Protocols
The string I want to remove is "ncacn_ip_tcp"
I tried using:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Rpc\DCOM Protocols]
"ncacn_ip_tcp"=-
That didn't work.
I think I'm running into problems with this one because it's a multi-string. I think I'm messing up the syntax. Any ideas?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|