[wpkg-users] [OT?] Nested for on a cmd script...
Marco Gaiarin
gaio at sv.lnf.it
Wed Feb 4 12:06:26 CET 2015
Mandi! Rainer Meier
In chel di` si favelave...
> >but %type% (or !type!) is everytime 'REG_EXPAND_SZ', eg seems that
> >'find' call does not work, but instead work on commandline...
> I didn't try but maybe you have to delay-expand !ERRORLEVEL! rathr
> than %ERRORLEVEL% because the value needs to be delay-expanded or it
> will be the same value on each loop.
I've tried !ERRORLEVEL! and also the form:
set type=REG_EXPAND_SZ
echo !pathrule! | find "%"
if ERRORLEVEL 1 (
set type=REG_SZ
)
reversing the logic, but both set 'type' to 'REG_SZ'. So:
a) 'if %ERRORLEVEL% equ 0' return everytime TRUE
b) 'if !ERRORLEVEL! equ 0' return everytime FALSE
c) 'if ERRORLEVEL 1' return everytime TRUE
boh.
I've fixed the value to 'REG_EXPAND_SZ'. ;(
--
dott. Marco Gaiarin GNUPG Key ID: 240A3D66
Associazione ``La Nostra Famiglia'' http://www.sv.lnf.it/
Polo FVG - Via della Bontà, 7 - 33078 - San Vito al Tagliamento (PN)
marco.gaiarin(at)lanostrafamiglia.it t +39-0434-842711 f +39-0434-842797
Dona il 5 PER MILLE a LA NOSTRA FAMIGLIA!
http://www.lanostrafamiglia.it/25/index.php/component/k2/item/123
(cf 00307430132, categoria ONLUS oppure RICERCA SANITARIA)
More information about the wpkg-users
mailing list