How do I extract a path from the registry?

D

Don J

How do I extract a key (which is in the form of a path) from the
registry for use in a COPY or XCOPY command as part of a batch file?

Don J

------------------------------------------------------
 
R

Ron Martell

Don J said:
How do I extract a key (which is in the form of a path) from the
registry for use in a COPY or XCOPY command as part of a batch file?

Don J

Use Start - Run - REGEDIT

Locate the key that contains the information you want and select the
value in that key that has the path information.

Then use File - Export to save the contents as a .REG file in a known
location.

This will be a plain text file (you can open it with Notepad)
containing the key contents.

Good luck

Ron Martell Duncan B.C. Canada
--
Microsoft MVP (1997 - 2006)
On-Line Help Computer Service
http://onlinehelp.bc.ca

"Anyone who thinks that they are too small to make a difference
has never been in bed with a mosquito."
 
D

Don J

I've used the export command and this is what I get:

Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\WAB\WAB4\Wab File Name]
@="D:\\Documents and Settings\\Johansen\\Application
Data\\Microsoft\\Address Book\\Johansen.wab"

What are the double slashes for in the expression (@) for the file
path? How do I get rid of them, using commands I can apply from a Batch
file. I want to paste the entire path as an argument to a COPY command in a
batch file.

Don J

__________________________________________________________________
 
W

Wesley Vogel

What exactly are you trying to do?

When you Merge a .reg file, the double slashes are changed to single
slashes, i.e. D:\Documents and Settings\Johansen\Application
Data\Microsoft\Address Book\Johansen.wab

Use regedit to navigate to >>
HKEY_CURRENT_USER\Software\Microsoft\WAB\WAB4\Wab File Name
Double click (Default)
Use Ctrl + C to copy the Value data. The path.

Use the command...

REG QUERY "HKCU\Software\Microsoft\WAB\WAB4\Wab File Name"

in a command prompt.

Type: REG QUERY /? for help.

Type: reg /? for help.

If you open Johansen.wab, click Help, click About Address Book it will show
the path.

To copy a registry key name

1. In the registry tree (on the left), click a registry key.
2. On the Edit menu, click Copy Key Name.
3. Paste the name of the registry key into another program or document.

Or...

1. In the registry tree (on the left), right click a registry key.
2. Select Copy Key Name.
3. Paste the name of the registry key into another program or document.

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
Don J said:
I've used the export command and this is what I get:

Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\WAB\WAB4\Wab File Name]
@="D:\\Documents and Settings\\Johansen\\Application
Data\\Microsoft\\Address Book\\Johansen.wab"

What are the double slashes for in the expression (@) for the file
path? How do I get rid of them, using commands I can apply from a Batch
file. I want to paste the entire path as an argument to a COPY command
in a batch file.

Don J

__________________________________________________________________

Ron Martell said:
Use Start - Run - REGEDIT

Locate the key that contains the information you want and select the
value in that key that has the path information.

Then use File - Export to save the contents as a .REG file in a known
location.

This will be a plain text file (you can open it with Notepad)
containing the key contents.

Good luck

Ron Martell Duncan B.C. Canada
--
Microsoft MVP (1997 - 2006)
On-Line Help Computer Service
http://onlinehelp.bc.ca

"Anyone who thinks that they are too small to make a difference
has never been in bed with a mosquito."
 
P

POP

In
Don J said:
How do I extract a key (which is in the form of a path) from
the
registry for use in a COPY or XCOPY command as part of a batch
file?

Don J

------------------------------------------------------

Very often you can copy something like that by highlighting it an
dthen pressing CTRL-C, even when Copy isn't a contect menu
choice. Same with CTRL-V for paste.

Any help?

Pop
 

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