Hello!<br><br>Have you tried to add %ComSpec% /c in front of main command? <br><br>Could you show the package xml with cmd= ? <br><br>On which system did you try your script? Is it Seven? Is UAC active?<br><br clear="all">
-- <br>Best regards,<br>Kirill Kozlovskiy<br><br>
<br><br><div class="gmail_quote">2012/2/15 Marco Gaiarin <span dir="ltr"><<a href="mailto:gaio@sv.lnf.it">gaio@sv.lnf.it</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
I've wrote down a script/helper to add me in the task of adding some<br>
domain group to some local group, wrapping around 'net localgroup'.<br>
Script attached.<br>
<br>
The script, on console, from SYSTEM user (the same that run wpkg) seems<br>
to work well: check, add and remove membership correctly.<br>
<br>
Used inside wpkg recipe (on action and check condition) behave<br>
strangely.<br>
<br>
Look at this. From wpkg log:<br>
<br>
2012-02-14 18:10:55, DEBUG : Executing command: '"\\FILE\wpkg\tools\setlgrp.bat" check \"\\FILE\wpkg\packages\sudowin\sudoers-SANVITO.grp\" SANVITO'.<br>
2012-02-14 18:10:56, DEBUG : Execute check for program '"\\FILE\wpkg\tools\setlgrp.bat" check \"\\FILE\wpkg\packages\sudowin\sudoers-SANVITO.grp\" SANVITO' returned '0'. Evaluating condition 'exitcodeequalto' revealed true when comparing to expected value of '0'.<br>
<br>
from console:<br>
<br>
C:\WINDOWS\system32>"\\FILE\wpkg\tools\setlgrp.bat" check \"\\FILE\wpkg\packages\sudowin\sudoers-SANVITO.grp\" SANVITO<br>
C:\WINDOWS\system32>echo %ERRORLEVEL%<br>
1<br>
C:\WINDOWS\system32><br>
<br>
indeed the right answer is '1', because i've removed the membership<br>
manually to test check condition.<br>
<br>
<br>
Someone can help me?<br>
<br>
<br>
PS: anothe little mystere came from " escaping... if i run:<br>
"\\FILE\wpkg\tools\setlgrp.bat" check "\\FILE\wpkg\packages\sudowin\sudoers-SANVITO.grp" SANVITO<br>
return strange errors, i have to escape the " ... boh...<br>
<span class="HOEnZb"><font color="#888888"></font></span><br></blockquote></div>