Changing a key entry

J

Joseph

Hello

Within \hkey_local_machine\software\gemstar, is a registry entry of name N,
type reg_sz, Data 25.

Using a .reg file, how would I change the value from say 25 to 0. Would it
also work with negative numbers, say I wanted to change the value from 25
to -10.

Thank you
 
D

Dave Patrick

It's a string so yes the -10 will work but we've no idea whether the value
is acceptable to the application that reads the key.

------------gemstar.reg-----------
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\gemstar]
"N"="-10"
----------------------------------

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

:
| Hello
|
| Within \hkey_local_machine\software\gemstar, is a registry entry of name
N,
| type reg_sz, Data 25.
|
| Using a .reg file, how would I change the value from say 25 to 0. Would
it
| also work with negative numbers, say I wanted to change the value from 25
| to -10.
|
| Thank you
|
|
 
J

Joseph

Thank you, worked like a charm.

Quick question, when I was searching on how to make a registry file, I came
across a thread where someone was trying to delete a registry entry using a
..reg file and having the syntax

- [key]

This didn't work and someone suggested typing REGEDIT4 at the top of the
file. When I did the same thing, this worked for me.

What does regedit4 do?
 
J

Jerold Schulman

See tip 4012 » How do a delete a value name using Regedit in batch?
AND link in the 'Tips & Tricks' at http://www.jsifaq.com




Thank you, worked like a charm.

Quick question, when I was searching on how to make a registry file, I came
across a thread where someone was trying to delete a registry entry using a
.reg file and having the syntax

- [key]

This didn't work and someone suggested typing REGEDIT4 at the top of the
file. When I did the same thing, this worked for me.

What does regedit4 do?

Dave Patrick said:
It's a string so yes the -10 will work but we've no idea whether the value
is acceptable to the application that reads the key.

------------gemstar.reg-----------
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\gemstar]
"N"="-10"
----------------------------------

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

:
| Hello
|
| Within \hkey_local_machine\software\gemstar, is a registry entry of name
N,
| type reg_sz, Data 25.
|
| Using a .reg file, how would I change the value from say 25 to 0. Would
it
| also work with negative numbers, say I wanted to change the value from
25
| to -10.
|
| Thank you
|
|

Jerold Schulman
Windows Server MVP
JSI, Inc.
http://www.jsiinc.com
http://www.jsifaq.com
 
D

Dave Patrick

If you want to remove a key and all it's underlying values then you'll need
to construct your .reg file with a - minus sign in front of the key you want
to remove.

An example file to remove a file association .zzz from HKCR
-----------------Begin File-----------
Windows Registry Editor Version 5.00

[-HKEY_CLASSES_ROOT\.zzz]
----------------End File-------------

(note the minus sign in front of HKEY)


If you need to delete only certain values, for example the string value
"InfoTip"="Contains zzz files"

Then put a minus sign after the equals sign without "quotes", something like
"InfoTip"=-

So your .reg file would look like
----------------Begin File------------
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.zzz]
"InfoTip"=-
----------------End File-------------

regedit /s filename.reg to import silently


--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

:
| Thank you, worked like a charm.
|
| Quick question, when I was searching on how to make a registry file, I
came
| across a thread where someone was trying to delete a registry entry using
a
| .reg file and having the syntax
|
| - [key]
|
| This didn't work and someone suggested typing REGEDIT4 at the top of the
| file. When I did the same thing, this worked for me.
|
| What does regedit4 do?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top