Run Program/Open Document Task Not Working

Discuss RoboTask here
elwayfan446
Posts: 46
Joined: Tue Mar 28, 2017 3:05 pm

Re: Run Program/Open Document Task Not Working

Post by elwayfan446 »

Neither of the test tasks worked either. I put a pause in the .cmd file and when I execute, it simply says press any key to continue. When I click on the .cmd file it works fine. Still won't do anything in the scheduler.
Oleg
Site Admin
Posts: 3000
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: Run Program/Open Document Task Not Working

Post by Oleg »

Neither of the test tasks worked either.
you have to put your own CMD name and path
I used my own folder name and CMD file name for testing in these examples.
Oleg Yershov
elwayfan446
Posts: 46
Joined: Tue Mar 28, 2017 3:05 pm

Re: Run Program/Open Document Task Not Working

Post by elwayfan446 »

Yes, I did that and still not working correctly.
Oleg
Site Admin
Posts: 3000
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: Run Program/Open Document Task Not Working

Post by Oleg »

Some error messages in the log?
I can say nothing without additional information...

Can you run this task manually?

Also tell me, maybe you try to run this task from RoboTask Service?
Oleg Yershov
elwayfan446
Posts: 46
Joined: Tue Mar 28, 2017 3:05 pm

Re: Run Program/Open Document Task Not Working

Post by elwayfan446 »

There seems to be nothing in the log files, either for the task or general log. I can run the .cmd file manually and it does what it is supposed to. When I run the task I right click and run it. Nothing happens when I do that. I am not sure how to run this from the robotask service. If you can tell me how I will give it a try.
elwayfan446
Posts: 46
Joined: Tue Mar 28, 2017 3:05 pm

Re: Run Program/Open Document Task Not Working

Post by elwayfan446 »

Oleg, were you ever able to determine anything from the logs I sent?
Oleg
Site Admin
Posts: 3000
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: Run Program/Open Document Task Not Working

Post by Oleg »

Look at the task "Test cmd file with spaces (commandline utility) (imported)"
I have studied the log file.
Each session of task execution must begins with line
****** Starting task: <task_name> ******************
and be done with line
Task executed successfully

But I don't see this line in the log at several last sessions

You are using the action Run Command-Line Utility
I think that CMD file contains the pause command or some other interactive command.
The action catches input and output stream. So the pause command can't receive the key pressing event. The CMD file will not finish normally, because it waits.
The same effect when you try to redirect output (cmd.exe /c some_command_line > output.txt)

If you want to get any output information you have to remove any interactive commands from CMD file.
Oleg Yershov
elwayfan446
Posts: 46
Joined: Tue Mar 28, 2017 3:05 pm

Re: Run Program/Open Document Task Not Working

Post by elwayfan446 »

Oleg, there was a pause in there but I tried it several times without it and still nothing happens. The output file is blank. Again, this works fine when I run it manually or with Windows scheduler but I just cant get it to work with RoboTask. Windows scheduler has none of the funtionality that I need like RoboTask does so this is something I need to get working.
Oleg
Site Admin
Posts: 3000
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: Run Program/Open Document Task Not Working

Post by Oleg »

RoboTask uses the same shell function to run some CMD file (or document) as Windows™ explorer.
It must work as well as you run it manually. I'm sorry I can't understand where is the problem...

Maybe I don't know about some specific settings in your system. Possibly RoboTask works in some "sandbox". Sandbox provides restricted permissions for applications
Several antiviruses uses such mode for new installed programs. You have to allow common mode for application in settings.
Oleg Yershov
Oleg
Site Admin
Posts: 3000
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: Run Program/Open Document Task Not Working

Post by Oleg »

One more thing:

RoboTask is 32-bit application. It can work under x64 system without problems but several restrictions exist.

If you try to run CMD.EXE then system runs 32-bit version of CMD from C:\Windows\SysWOW64\CMD.EXE
When you try to run c:\windows\system32\cmd.exe system runs C:\Windows\SysWOW64\CMD.EXE too (!!!)

To run x64 version of CMD.EXE use command line
c:\windows\sysnative\cmd.exe
It this case system runs the native x64-bit version of CMD.EXE from C:\Windows\System32\CMD.EXE

It most cases there are not matter what version is working. But sometimes it is critical.
Try this trick with sysnative virtual folder

In this case full command line will be:
c:\windows\sysnative\cmd.exe /c your_cmd_file
Oleg Yershov
Post Reply