why does collection record destroy iterating over management output?


i have collection record uses jargon (many times) review registry value an sourroundings variable:



for /f "tokens=2* delims=  " %%a ('reg query "hklm\software\path\to\key" /v valuename') set myvariable=%%b


(there's add-on impression after delims=)



this works glorious thousands customer's computers. nonetheless customer's mechanism (running windows server 2003, management extensions enabled),

fails 'reg query "hklm\software\path\to\key" /v valuename' famous an middle outmost command, operable way collection file.' controlling "reg query" management alone works fine. reg.exe donation c:\windows\system32.



i means work around problem changing formula to



reg query "hklm\software\path\to\key" /v valuename > temp.txt
for /f "tokens=2* delims= " %%a (temp.txt) set myvariable=%%b


this got fan adult running, nonetheless i know since problem occurred i prevaricate future.



slightly off primary theme - some-more proceed approach registry value (string dword) an sourroundings non-static also useful.



Comments

Popular posts from this blog

list macos calm editors formula editors

how hibernate @any-related annotations?

why does floated <input> control floated component slip over too distant right ie7, nonetheless firefox?