Hi,
I'm new of this thread and I do not know if this is the right section of the forum. I'm under windows 10 1803 64 bit.
I have two scripts (.cmd and .ps1) which execute the same operation. The scripts work well if I run them from cmd or powershell while they do not work if I use schtasks.
In particular, the job is created correctly and it starts after login, but the scripts fail to execute. The script executes a program in a new windows, but it is closed immediately and it is not possible to catch the error.
I tried to redirect the output of cmd in order to capture the error, but it does not work.
Thank you very much. Your workaround worked, by using cmd /k I found that the problem was related to the working directory.
Both the following works well.