[wpkg-users] [OT] i hate script in cmd... ;(((

k2 kirill.k2 at gmail.com
Wed Feb 15 00:32:56 CET 2012


Hello!

Have you tried to add %ComSpec% /c in front of main command?

Could you show the package xml with cmd= ?

On which system did you try your script? Is it Seven? Is UAC active?

-- 
Best regards,
Kirill Kozlovskiy



2012/2/15 Marco Gaiarin <gaio at sv.lnf.it>

>
> I've wrote down a script/helper to add me in the task of adding some
> domain group to some local group, wrapping around 'net localgroup'.
> Script attached.
>
> The script, on console, from SYSTEM user (the same that run wpkg) seems
> to work well: check, add and remove membership correctly.
>
> Used inside wpkg recipe (on action and check condition) behave
> strangely.
>
> Look at this. From wpkg log:
>
>  2012-02-14 18:10:55, DEBUG   : Executing command:
> '"\\FILE\wpkg\tools\setlgrp.bat" check
> \"\\FILE\wpkg\packages\sudowin\sudoers-SANVITO.grp\" SANVITO'.
>  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'.
>
> from console:
>
>  C:\WINDOWS\system32>"\\FILE\wpkg\tools\setlgrp.bat" check
> \"\\FILE\wpkg\packages\sudowin\sudoers-SANVITO.grp\" SANVITO
>  C:\WINDOWS\system32>echo %ERRORLEVEL%
>  1
>  C:\WINDOWS\system32>
>
> indeed the right answer is '1', because i've removed the membership
> manually to test check condition.
>
>
> Someone can help me?
>
>
> PS: anothe little mystere came from " escaping... if i run:
>        "\\FILE\wpkg\tools\setlgrp.bat" check
> "\\FILE\wpkg\packages\sudowin\sudoers-SANVITO.grp" SANVITO
>  return strange errors, i have to escape the " ... boh...
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wpkg.org/pipermail/wpkg-users/attachments/20120215/13860a69/attachment-0002.html>


More information about the wpkg-users mailing list