Getting a Directory Path From Registry

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
sarcasteak
Posts: 1
Joined: 14 Sep 2009 09:20

Getting a Directory Path From Registry

#1 Post by sarcasteak » 14 Sep 2009 09:27

I think I am going about this the wrong way

Code: Select all

set testvar=reg query HKCU\Software\Lotus\Notes\Installer\ /v PROGDIR"
cd %testvar%


it doesn't seem to this properly, am I not performing the command properly?

avery_larry
Expert
Posts: 391
Joined: 19 Mar 2009 08:47
Location: Iowa

#2 Post by avery_larry » 14 Sep 2009 11:06

I think you forgot a double quote here:


Code: Select all

set "testvar=reg query HKCU\Software\Lotus\Notes\Installer\ /v PROGDIR"


And this is just not possible:

Code: Select all

cd %testvar%


I'm guessing you want this:

Code: Select all

%testvar%

Post Reply