Scripting - Psexec problem when execute .cmd in task scheduler

I faced following problem executing, in task scheduler, following psexec command (trying to automate some tasks)

I could view cmd and psexec processes idle (from command line script worked well) and task was running indefinitevely.

Solution that I found was:

1. Execute psexec with different user to override first psexec window popup

2. Adding these bold parameters:

 psexec \\%%a -e -u domain\userdomain -p usernamepassword -h cmd.exe /c "c:\windows\system32\scriptname.cmd"

more details:

http://forum.sysinternals.com/using-psexec-and-windows-task-scheduler_topic9654.html