Technology Questions

Go Back   Technology Questions > Software Questions > Operating System Questions > Windows XP

Windows XP Discuss the Microsoft Windows XP Operating System

Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old 04-16-2007, 01:15 PM
Ron Sochanski
Newsgroup Contributor
 
Posts: n/a
Append to an Existing REG_SZ Value in Registry Using a .Reg File

Hello. How can a REG_SZ registry value be modified using a .reg file, so as
to append a string to the original data of the value? In other words, if a
Windows registry key [HKLM/.../ABCDE] has a REG_SZ value Value1 where
Value1's data is equal to "String1", then how can I modify Value1's data to
be "String1"+"String2" (i.e., "String1" concatenated with "String2") using a
..reg file, where Value1's data is not known? Thank you.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

 
Old 04-16-2007, 01:15 PM
  #2 (permalink)  
Old 04-16-2007, 02:30 PM
Pegasus \(MVP\)
Newsgroup Contributor
 
Posts: n/a
Re: Append to an Existing REG_SZ Value in Registry Using a .Reg File


"Ron Sochanski" <RonSochanski@discussions.microsoft.com> wrote in message
news:61232D85-3056-4240-B8AD-A3269D3E8E23@microsoft.com...
> Hello. How can a REG_SZ registry value be modified using a .reg file, so

as
> to append a string to the original data of the value? In other words, if

a
> Windows registry key [HKLM/.../ABCDE] has a REG_SZ value Value1 where
> Value1's data is equal to "String1", then how can I modify Value1's data

to
> be "String1"+"String2" (i.e., "String1" concatenated with "String2") using

a
> .reg file, where Value1's data is not known? Thank you.


You have to extport the value, add your string to its data, then
import it into the registry.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #3 (permalink)  
Old 04-17-2007, 06:30 AM
Ron Sochanski
Newsgroup Contributor
 
Posts: n/a
Re: Append to an Existing REG_SZ Value in Registry Using a .Reg Fi



"Pegasus (MVP)" wrote:

>
> "Ron Sochanski" <RonSochanski@discussions.microsoft.com> wrote in message
> news:61232D85-3056-4240-B8AD-A3269D3E8E23@microsoft.com...
> > Hello. How can a REG_SZ registry value be modified using a .reg file, so

> as
> > to append a string to the original data of the value? In other words, if

> a
> > Windows registry key [HKLM/.../ABCDE] has a REG_SZ value Value1 where
> > Value1's data is equal to "String1", then how can I modify Value1's data

> to
> > be "String1"+"String2" (i.e., "String1" concatenated with "String2") using

> a
> > .reg file, where Value1's data is not known? Thank you.

>
> You have to extport the value, add your string to its data, then
> import it into the registry.
>
>
>

That would only work if the value's original data is identical on both
source and target machine. If the value's original data on the target
machine differs from that of the source machine in the distributed .reg file,
the value's original data on the target machine would essentially be lost.
What's needed here is dynamically determining a value's original data using a
..reg file. Can this be done? Thank you.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #4 (permalink)  
Old 04-17-2007, 08:01 AM
Pegasus \(MVP\)
Newsgroup Contributor
 
Posts: n/a
Re: Append to an Existing REG_SZ Value in Registry Using a .Reg Fi


"Ron Sochanski" <RonSochanski@discussions.microsoft.com> wrote in message
news:2A7CA875-87BF-4A8A-A896-F03EE962DFFA@microsoft.com...
>
>
> "Pegasus (MVP)" wrote:
>
> >
> > "Ron Sochanski" <RonSochanski@discussions.microsoft.com> wrote in

message
> > news:61232D85-3056-4240-B8AD-A3269D3E8E23@microsoft.com...
> > > Hello. How can a REG_SZ registry value be modified using a .reg file,

so
> > as
> > > to append a string to the original data of the value? In other words,

if
> > a
> > > Windows registry key [HKLM/.../ABCDE] has a REG_SZ value Value1 where
> > > Value1's data is equal to "String1", then how can I modify Value1's

data
> > to
> > > be "String1"+"String2" (i.e., "String1" concatenated with "String2")

using
> > a
> > > .reg file, where Value1's data is not known? Thank you.

> >
> > You have to extport the value, add your string to its data, then
> > import it into the registry.
> >
> >
> >

> That would only work if the value's original data is identical on both
> source and target machine. If the value's original data on the target
> machine differs from that of the source machine in the distributed .reg

file,
> the value's original data on the target machine would essentially be lost.
> What's needed here is dynamically determining a value's original data

using a
> .reg file. Can this be done? Thank you.


If you run the process I described on the target machine
then it will work because it will extract the existing data
on that machine, no matter what it is.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #5 (permalink)  
Old 04-17-2007, 08:45 AM
Ron Sochanski
Newsgroup Contributor
 
Posts: n/a
Re: Append to an Existing REG_SZ Value in Registry Using a .Reg Fi



"Pegasus (MVP)" wrote:

>
> "Ron Sochanski" <RonSochanski@discussions.microsoft.com> wrote in message
> news:2A7CA875-87BF-4A8A-A896-F03EE962DFFA@microsoft.com...
> >
> >
> > "Pegasus (MVP)" wrote:
> >
> > >
> > > "Ron Sochanski" <RonSochanski@discussions.microsoft.com> wrote in

> message
> > > news:61232D85-3056-4240-B8AD-A3269D3E8E23@microsoft.com...
> > > > Hello. How can a REG_SZ registry value be modified using a .reg file,

> so
> > > as
> > > > to append a string to the original data of the value? In other words,

> if
> > > a
> > > > Windows registry key [HKLM/.../ABCDE] has a REG_SZ value Value1 where
> > > > Value1's data is equal to "String1", then how can I modify Value1's

> data
> > > to
> > > > be "String1"+"String2" (i.e., "String1" concatenated with "String2")

> using
> > > a
> > > > .reg file, where Value1's data is not known? Thank you.
> > >
> > > You have to extport the value, add your string to its data, then
> > > import it into the registry.
> > >
> > >
> > >

> > That would only work if the value's original data is identical on both
> > source and target machine. If the value's original data on the target
> > machine differs from that of the source machine in the distributed .reg

> file,
> > the value's original data on the target machine would essentially be lost.
> > What's needed here is dynamically determining a value's original data

> using a
> > .reg file. Can this be done? Thank you.

>
> If you run the process I described on the target machine
> then it will work because it will extract the existing data
> on that machine, no matter what it is.
>
>
>

The process you described involved exporting from the registry and then
subsequently importing into the registry. The only way I know of to export
is to do so manually, i.e., via manually running regedit and then exporting.
On the target machine, therefore, I'd need to manually export, manually edit
the .reg file that was created and then apply the .reg file. I desire to
have a .reg file that has already been created which I could copy to the
target machine and simply run. I don't want to export manually on the target
machine. If there is an automated method to accomplish this, then please
advise.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #6 (permalink)  
Old 04-17-2007, 03:15 PM
Pegasus \(MVP\)
Newsgroup Contributor
 
Posts: n/a
Re: Append to an Existing REG_SZ Value in Registry Using a .Reg Fi


"Ron Sochanski" <RonSochanski@discussions.microsoft.com> wrote in message
news:869F5809-9D7F-4114-9811-54683F817C4B@microsoft.com...
>
>
> "Pegasus (MVP)" wrote:
>
> >
> > "Ron Sochanski" <RonSochanski@discussions.microsoft.com> wrote in

message
> > news:2A7CA875-87BF-4A8A-A896-F03EE962DFFA@microsoft.com...
> > >
> > >
> > > "Pegasus (MVP)" wrote:
> > >
> > > >
> > > > "Ron Sochanski" <RonSochanski@discussions.microsoft.com> wrote in

> > message
> > > > news:61232D85-3056-4240-B8AD-A3269D3E8E23@microsoft.com...
> > > > > Hello. How can a REG_SZ registry value be modified using a .reg

file,
> > so
> > > > as
> > > > > to append a string to the original data of the value? In other

words,
> > if
> > > > a
> > > > > Windows registry key [HKLM/.../ABCDE] has a REG_SZ value Value1

where
> > > > > Value1's data is equal to "String1", then how can I modify

Value1's
> > data
> > > > to
> > > > > be "String1"+"String2" (i.e., "String1" concatenated with

"String2")
> > using
> > > > a
> > > > > .reg file, where Value1's data is not known? Thank you.
> > > >
> > > > You have to extport the value, add your string to its data, then
> > > > import it into the registry.
> > > >
> > > >
> > > >
> > > That would only work if the value's original data is identical on both
> > > source and target machine. If the value's original data on the target
> > > machine differs from that of the source machine in the distributed

..reg
> > file,
> > > the value's original data on the target machine would essentially be

lost.
> > > What's needed here is dynamically determining a value's original data

> > using a
> > > .reg file. Can this be done? Thank you.

> >
> > If you run the process I described on the target machine
> > then it will work because it will extract the existing data
> > on that machine, no matter what it is.
> >
> >
> >

> The process you described involved exporting from the registry and then
> subsequently importing into the registry. The only way I know of to

export
> is to do so manually, i.e., via manually running regedit and then

exporting.
> On the target machine, therefore, I'd need to manually export, manually

edit
> the .reg file that was created and then apply the .reg file. I desire to
> have a .reg file that has already been created which I could copy to the
> target machine and simply run. I don't want to export manually on the

target
> machine. If there is an automated method to accomplish this, then please
> advise.


Here is an example:

regedit /e c:\test.reg HKEY_LOCAL_MACHINE\SOFTWARE\ORL\WinVNC3\Default


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Reply

Bookmarks

Thread Tools

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
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Corrupted existing WINXP registry after installing 2nd WinXP im_chc Windows XP 0 03-19-2008 12:30 AM
File copy - existing destination file gets deleted GK Windows XP 1 12-19-2007 02:40 AM
How can you Copy a file to all existing profiles? David Allen Windows XP 8 10-06-2007 11:00 AM
REG_SZ vs REG_EXPAND_SZ data types for %SystemRoot% in registry FUBARinSFO Windows XP 8 06-22-2007 03:30 PM
ftp append text to a file VitaminB Windows XP 2 01-17-2007 02:00 PM


New To Technology Questions? Do You Need Help with Your Computer or Device? Do You Need Help with this site?

All times are GMT -8. The time now is 09:19 PM.


2003 - 2009 All Rights Reserved. Technology Questions

Search Engine Friendly URLs by vBSEO 3.3.0