reg command line utility, cont.

K

kakii

Unfortunately, "reg copy" doesn't help me as well,
because it operates on keys/subkeys.
I want to operate on a single key value.
reg copy returns error like "key not found" if as source
the value path is entered.

Really no chance to work with single values ?



You can use REG COPY to save a value to another dummy key and
location > *inside* the registry then you can then use REG SAVE to save the
copied dummy key to a file on the disk. I take it that you
understand > the registry and that you are familiar working with
registry data, all > of the examples below are safe to try but you need
to know what you
are doing to work with these commands, you may want to take a restore
point or back up your registry before you play with these commands
and > examples, if it blows up in your face it's not my fault!
To see the above in semi real time open Regedit and Alt+Tab your way
between Regedit and the Command Prompt. After you run commands, and
while you are in Regedit, press F5 to refresh the registry, it takes
a > few seconds and you may have to hit F5 more than once to see the
changes, data is only written to the Registry when a flush occurs,
which happens after changed data ages past a few seconds, or when an
application intentionally flushes the data to the hard disk. In
Regedit go to the HKCU root key, that is a safe place to send our test > to.

To copy the PagingFiles value:

REG COPY "HKLM\SYSTEM\CurrentControlSet\Control\Session
Manager\Memory > Management\PagingFiles" HKCU\Test\PagingFiles
 
K

kakii

I did it.

Finally I found a better solution.
Using pagefileconfig.vbs one can accomplish this task with two command
line sequence.
echo y > yesanswer.txt
cscript pagefileconfig.vbs /delete /vo c: < yesanswer.txt
 

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