PDA

View Full Version : How to edit XP registry from the command line?


Serge
December 5th 03, 01:24 AM
Greetings,

I'm looking for help on how to edit XP registry from the command line.

I have three accounts - Administrator, user1, user2 (the last two
users are in the Administrators group). I logged on as user2, exported
a registry key (just one key, a couple of lines) under
HKEY_CURRENT_USER, saved in key.reg file and then deleted actual
record in registry. Then, I logged off and logged on as user1.
Unfortunately I was not been able to restore this key (for user2) by
running regedit command.

Apparently it works in Win 95/98 according to
http://techsupt.winbatch.com/TS/T000001029F18.html
http://www.winguides.com/article.php?id=1&page=4&guide=registry
http://people.cornell.edu/pages/nk74/regedit.html

by executing the following command (as an example) - regedit
/l:c:\windows\system.dat /r:c:\windows\user.dat /e
c:\windows\newreg.reg, but...what's about XP where neither system.dat
nor user.dat are no longer exist (my attempts to use ntuser.dat
instead failed...).

It's very important for me to find a solution ASAP, therefore any help
would be GREATLY APPRECIATED!!!!!!!

Very best regards,
Serge

Doug Knox MS-MVP
December 5th 03, 01:24 AM
Open a command prompt and type REG /? for the command line tool and its
options.

--
Doug Knox, MS-MVP Windows XP/ Windows Smart Display
Win 95/98/Me/XP Tweaks and Fixes
http://www.dougknox.com
--------------------------------
Associate Expert
ExpertZone - http://www.microsoft.com/windowsxp/expertzone
--------------------------------
Please reply only to the newsgroup so all may benefit.
Unsolicited e-mail is not answered.

"Serge" > wrote in message
om...
> Greetings,
>
> I'm looking for help on how to edit XP registry from the command line.
>
> I have three accounts - Administrator, user1, user2 (the last two
> users are in the Administrators group). I logged on as user2, exported
> a registry key (just one key, a couple of lines) under
> HKEY_CURRENT_USER, saved in key.reg file and then deleted actual
> record in registry. Then, I logged off and logged on as user1.
> Unfortunately I was not been able to restore this key (for user2) by
> running regedit command.
>
> Apparently it works in Win 95/98 according to
> http://techsupt.winbatch.com/TS/T000001029F18.html
> http://www.winguides.com/article.php?id=1&page=4&guide=registry
> http://people.cornell.edu/pages/nk74/regedit.html
>
> by executing the following command (as an example) - regedit
> /l:c:\windows\system.dat /r:c:\windows\user.dat /e
> c:\windows\newreg.reg, but...what's about XP where neither system.dat
> nor user.dat are no longer exist (my attempts to use ntuser.dat
> instead failed...).
>
> It's very important for me to find a solution ASAP, therefore any help
> would be GREATLY APPRECIATED!!!!!!!
>
> Very best regards,
> Serge

Serge
December 5th 03, 01:24 AM
Dear Mr. Knox,

Thanks a lot for your advise!
I logged on as user1, used "reg save" command to create a *.hiv file,
then logged off and logged on as user2. After that I run "reg store"
command (looks like it's the only option since the "reg load" supports
only HKLM and HKU)to "restore" a key under HKCU. The big question
remains - how to add/change a key in user2 registry while still logon
as user1...
I would greatly appreciate if you could give me a hand again!

Very best regards,
Serge Konevsky



"Doug Knox MS-MVP" > wrote in message >...
> Open a command prompt and type REG /? for the command line tool and its
> options.
>
> --
> Doug Knox, MS-MVP Windows XP/ Windows Smart Display
> Win 95/98/Me/XP Tweaks and Fixes
> http://www.dougknox.com
> --------------------------------
> Associate Expert
> ExpertZone - http://www.microsoft.com/windowsxp/expertzone
> --------------------------------
> Please reply only to the newsgroup so all may benefit.
> Unsolicited e-mail is not answered.
>
> "Serge" > wrote in message
> om...
> > Greetings,
> >
> > I'm looking for help on how to edit XP registry from the command line.
> >
> > I have three accounts - Administrator, user1, user2 (the last two
> > users are in the Administrators group). I logged on as user2, exported
> > a registry key (just one key, a couple of lines) under
> > HKEY_CURRENT_USER, saved in key.reg file and then deleted actual
> > record in registry. Then, I logged off and logged on as user1.
> > Unfortunately I was not been able to restore this key (for user2) by
> > running regedit command.
> >
> > Apparently it works in Win 95/98 according to
> > http://techsupt.winbatch.com/TS/T000001029F18.html
> > http://www.winguides.com/article.php?id=1&page=4&guide=registry
> > http://people.cornell.edu/pages/nk74/regedit.html
> >
> > by executing the following command (as an example) - regedit
> > /l:c:\windows\system.dat /r:c:\windows\user.dat /e
> > c:\windows\newreg.reg, but...what's about XP where neither system.dat
> > nor user.dat are no longer exist (my attempts to use ntuser.dat
> > instead failed...).
> >
> > It's very important for me to find a solution ASAP, therefore any help
> > would be GREATLY APPRECIATED!!!!!!!
> >
> > Very best regards,
> > Serge

Doug Knox MS-MVP
December 5th 03, 01:24 AM
See http://www.dougknox.com, Win XP Tips, Advanced Registry Editing for the
method to accomplish this :)

--
Doug Knox, MS-MVP Windows XP/ Windows Smart Display
Win 95/98/Me/XP Tweaks and Fixes
http://www.dougknox.com
--------------------------------
Associate Expert
ExpertZone - http://www.microsoft.com/windowsxp/expertzone
--------------------------------
Please reply only to the newsgroup so all may benefit.
Unsolicited e-mail is not answered.

"Serge" > wrote in message
om...
> Dear Mr. Knox,
>
> Thanks a lot for your advise!
> I logged on as user1, used "reg save" command to create a *.hiv file,
> then logged off and logged on as user2. After that I run "reg store"
> command (looks like it's the only option since the "reg load" supports
> only HKLM and HKU)to "restore" a key under HKCU. The big question
> remains - how to add/change a key in user2 registry while still logon
> as user1...
> I would greatly appreciate if you could give me a hand again!
>
> Very best regards,
> Serge Konevsky
>
>
>
> "Doug Knox MS-MVP" > wrote in message
>...
> > Open a command prompt and type REG /? for the command line tool and its
> > options.
> >
> > --
> > Doug Knox, MS-MVP Windows XP/ Windows Smart Display
> > Win 95/98/Me/XP Tweaks and Fixes
> > http://www.dougknox.com
> > --------------------------------
> > Associate Expert
> > ExpertZone - http://www.microsoft.com/windowsxp/expertzone
> > --------------------------------
> > Please reply only to the newsgroup so all may benefit.
> > Unsolicited e-mail is not answered.
> >
> > "Serge" > wrote in message
> > om...
> > > Greetings,
> > >
> > > I'm looking for help on how to edit XP registry from the command line.
> > >
> > > I have three accounts - Administrator, user1, user2 (the last two
> > > users are in the Administrators group). I logged on as user2, exported
> > > a registry key (just one key, a couple of lines) under
> > > HKEY_CURRENT_USER, saved in key.reg file and then deleted actual
> > > record in registry. Then, I logged off and logged on as user1.
> > > Unfortunately I was not been able to restore this key (for user2) by
> > > running regedit command.
> > >
> > > Apparently it works in Win 95/98 according to
> > > http://techsupt.winbatch.com/TS/T000001029F18.html
> > > http://www.winguides.com/article.php?id=1&page=4&guide=registry
> > > http://people.cornell.edu/pages/nk74/regedit.html
> > >
> > > by executing the following command (as an example) - regedit
> > > /l:c:\windows\system.dat /r:c:\windows\user.dat /e
> > > c:\windows\newreg.reg, but...what's about XP where neither system.dat
> > > nor user.dat are no longer exist (my attempts to use ntuser.dat
> > > instead failed...).
> > >
> > > It's very important for me to find a solution ASAP, therefore any help
> > > would be GREATLY APPRECIATED!!!!!!!
> > >
> > > Very best regards,
> > > Serge

Google