# Getting at the Registry from batch file



## Mike Beale (Oct 27, 1999)

Does anyone have any ideas/tips for how to get values from the registry with a batch file, from Windows 95.

I have two programs already, EDIFIC from http://www.dlcsistemas.com/html/edific.html, but that only allows to add/delete from the registry, and
REG from http://www.mindspring.com/~dgthomas/

REG does allow values to be read from DOS and Batch files, but unfortunately it does not seem to be able to retrieve the "(Default)" value of a key. I've emailed the author, but as of yet had no reply.

Anyone who knows of a program that would able me to do this?

Thanx
Mike


----------



## MacFromOK (Mar 19, 2001)

Check out the link in my signature. This program
originally started out as a "batch" program for
Windows, but has evolved into a remarklably
versatile language. It's fully functional shareware
and can access the registry, but you'll have to
register the program before you can make EXE files.


----------



## Mike Beale (Oct 27, 1999)

Cheers MacFromOK I shall rush off and check it out right now


----------



## MacFromOK (Mar 19, 2001)

No problemo, and I also have a lot of code for
this program.


----------



## Mike Beale (Oct 27, 1999)

That does look like a great program, but I think It's a bit over the top for what I want to do at the moment, but may be usefull for something else I have got lined up to do!!!


Basically all I need to do is to retrieve the default value from a key in the registry, and put the value into an environment variable, or output to a text file.
The other program I have (REG) does this, but will not get the default value.


----------



## MacFromOK (Mar 19, 2001)

Well, either post or email me what you want
to do in as much detail as you can, and if
I get some spare time in the next few days
(like I'm so busy right now?), I'll try to
whip up something for you with VDS, if your
needs ain't too complicated.


----------



## Mike Beale (Oct 27, 1999)

All I need to do is get the default value from:
HKEY_CURRENT_USER/Software/Microsoft/Office/8.0/Common/FileNew/LocalTemplates
and save it to an environment variable (something like TEMPLATES) so I can use it with a batch file.
This batch file will be used within a DOS box in Windows 95.

Cheers

[Edited by Mike Beale on 04-10-2001 at 04:20 AM]


----------



## Mike Beale (Oct 27, 1999)

I have finally managed to get this one!

After much playing around with the REG program, I found I could get the default values by including the key in quotes, and adding a space at the end, e.g:

"HKEY_CURRENT_USER\Software\Microsoft\Office\8.0\Common\FileNew\LocalTemplates\ "

Now I can get on with the rest of it


----------



## ~Candy~ (Jan 27, 2001)

Hola MAC --- no problemo??? Your Spanish teach must be proud of you!!!


No problemo, and I also have a lot of code for 
this program.
__________________
ANYONE ELSE HAVE ANY IDEAS ON THIS? 
____________________________________________


----------

