Oct 7
The answer to the question was of course pushed me to the precise moment when I had published the article.
The solution is here and is frighteningly simple.
'For' passed as a delimiter just a tab, why I am not here come on it ...
%% a in ( 'reg query "HKLM\SOFTWARE\SPSS\SPSS for Windows German\15.0\Setup" /v Directory' ) do set pfad = %% b for / f "tokens = 2 * delims ="%% a in ('reg query "HKLM \ SOFTWARE \ SPSS \ SPSS for Windows German \ 15.0 \ Setup" / v Directory') do set path =%% b
It's that simple.
Simple question, seemingly serious answer.
I am looking for a general working method the value of any key read.
With a key I have already managed, but I had to cut the batch line directly to that key down and write, this is not universal.
on @ Echo on %% a in ( 'reg query "HKLM\SOFTWARE\SPSS\SPSS for Windows German\15.0\Setup" /v "Directory" ^| findstr "Directory" ^| findstr "C:\\"' ) do set pfad =C: %% a for / f "tokens = 2 delims = C:"%% a in ('reg query "HKLM \ SOFTWARE \ SPSS \ SPSS for Windows German \ 15.0 \ Setup" / v "Directory" ^ | findstr "Directory" ^ | findstr "C: \ \" ') do set path = C:%% a pfad % echo% path% pause
In this way I get the path from the SPSS installation in a variable. That this path for all other keys (except perhaps what with a path as a value) no longer works, I must mention probably not.
So, suggestions?
Did you enjoy this post? Then look yet at the "Similar items" to and subscribe to my RSS feed .
Leave a reply