Created batch file seems....incorrect

Discuss RoboTask here
Post Reply
Rukbunker
Posts: 245
Joined: Mon Feb 22, 2016 4:06 pm
Location: Netherlands

Created batch file seems....incorrect

Post by Rukbunker »

On a task, I created a batch file on the desktop. When I execute it, he doesn't like it. What do I miss here? I created it by right clicking "Create batch file" and added the pause command to see why I didn't ran.

When I run the task itself in Robotask, it works great.
weirdbat.jpg
weirdbat.jpg (66.85 KiB) Viewed 192 times
Oleg
Site Admin
Posts: 3316
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: Created batch file seems....incorrect

Post by Oleg »

Very interesting...

Could you send this CMD file as it is to me by email (as attachment)?
I want to take a look at this...
Oleg Yershov
Rukbunker
Posts: 245
Joined: Mon Feb 22, 2016 4:06 pm
Location: Netherlands

Re: Created batch file seems....incorrect

Post by Rukbunker »

I've sent you a PM on this forum, I know sometimes cmd/bat files are blocked with emails.
Oleg
Site Admin
Posts: 3316
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: Created batch file seems....incorrect

Post by Oleg »

This is possible when the task is busy. For example the task is opened in task editor or running.
In this case you will get exactly this error.
Close task editor and try again.
Oleg Yershov
Rukbunker
Posts: 245
Joined: Mon Feb 22, 2016 4:06 pm
Location: Netherlands

Re: Created batch file seems....incorrect

Post by Rukbunker »

This is possible when the task is busy. For example the task is opened in task editor or running.
In this case you will get exactly this error.
Close task editor and try again.
I did, but no difference. The task wasn't busy and the editor wasn't opened. When I run the task in Robotask manually it responds as it should.

I've tried it with 2 other tasks: same behaviour.
Oleg
Site Admin
Posts: 3316
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: Created batch file seems....incorrect

Post by Oleg »

Maybe RoboTask is running in "As administrator" mode?
In this case you will get the same error. You must run you CMD/BAT file with administrative permissions too.
You cannot send commands to an application with higher privileges.
Oleg Yershov
Rukbunker
Posts: 245
Joined: Mon Feb 22, 2016 4:06 pm
Location: Netherlands

Re: Created batch file seems....incorrect

Post by Rukbunker »

Correct, that was the trick! Run as admin: batchfile works.
Oleg
Site Admin
Posts: 3316
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: Created batch file seems....incorrect

Post by Oleg »

To run some command line with rights elevation use RG.EXE utility:
Running command line with the rights elevation.
Location:
"C:\Program Files\RoboTask\RG.exe"

Usage:
RG.exe [/p] <command_line>
/p - RG waits when the command will be finished
Oleg Yershov
Post Reply