Page 1 of 1

Getting a Directory Path From Registry

Posted: 14 Sep 2009 09:27
by sarcasteak
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?

Posted: 14 Sep 2009 11:06
by avery_larry
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%