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 »

Oleg,

Your software has been vetted and approved by my company so I don't think antivirus would be blocking it. I tried to run c:\windows\sysnative\cmd.exe and I got the message that the file couldn't be found. This is so puzzling.
elwayfan446
Posts: 46
Joined: Tue Mar 28, 2017 3:05 pm

Re: Run Program/Open Document Task Not Working

Post by elwayfan446 »

Oleg wrote: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
Hi Oleg,

I am back trying to get my .cmd file to run from RoboTask and I am revisiting this suggestion. I am not sure I am plugging this into the task box right. Can you send a screenshot on how I can call the .cmd file this way?

Thanks,
Scott
Oleg
Site Admin
Posts: 3004
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: Run Program/Open Document Task Not Working

Post by Oleg »

Look at this example

Code: Select all

;*****************************
;* RoboTask Task file
;* Do not edit in text editor!
;*****************************
 
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|263000617
Comment=STRINGLIST
ContinueOnError=INTEGER|0
ExternalName=STRING|"Task156"
Hide=INTEGER|0
ID=INTEGER|195597699
LogOnAsUser=INTEGER|1
Name=STRING|"sysnative"
OnErrorTaskID=INTEGER|-1
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
UnicodeFormat=INTEGER|1
WriteGeneralLog=INTEGER|0

[Actions]
Action1=FOLDER

[Actions\Action1]
ActionID=STRING|"A_GENERAL_RUN_PROG"
Enabled=INTEGER|-1
Name=STRING|"Run ""cmd.exe """
Params=FOLDER

[Actions\Action1\Params]
ifnonzero=STRING|"0"
program=STRING|"c:\windows\sysnative\cmd.exe"
runas=STRING|"0"
wait=STRING|"0"
if you need to run some command line look at this:

Code: Select all

;*****************************
;* RoboTask Task file
;* Do not edit in text editor!
;*****************************
 
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|0
CatID=INTEGER|263000617
Comment=STRINGLIST
ContinueOnError=INTEGER|0
ExternalName=STRING|"Task159"
Hide=INTEGER|0
ID=INTEGER|-1475315895
LogOnAsUser=INTEGER|1
Name=STRING|"sysnative 2"
OnErrorTaskID=INTEGER|-1
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
UnicodeFormat=INTEGER|1
WriteGeneralLog=INTEGER|0

[Actions]
Action1=FOLDER
Action2=FOLDER

[Actions\Action1]
ActionID=STRING|"A_MISC_RUNCONSOLEAPP"
Enabled=INTEGER|-1
Name=STRING|"Run command-line utility: cmd.exe /c echo put here some command line"
Params=FOLDER

[Actions\Action1\Params]
convertansi=STRING|"0"
ifnonzero=STRING|"0"
outputvar=STRING|"out"
params=STRING|"/c echo put here some command line"
program=STRING|"c:\windows\sysnative\cmd.exe"
saveexitcode=STRING|"0"
saveoutput=STRING|"1"

[Actions\Action2]
ActionID=STRING|"A_DIALOG_MESSAGE"
Enabled=INTEGER|-1
Name=STRING|"Show ""{out}"""
Params=FOLDER

[Actions\Action2\Params]
icon=STRING|"1"
msg0=STRING|"{out}"
msgcount=STRING|"1"
playsound=STRING|"0"
showmessage=STRING|"1"
Save the text of the task to a file and use menu Task->Import to import the task into RoboTask.

Both tasks work on Windows 10 x64 without problem
Oleg Yershov
elwayfan446
Posts: 46
Joined: Tue Mar 28, 2017 3:05 pm

Re: Run Program/Open Document Task Not Working

Post by elwayfan446 »

Finally! I got this to work. It has been a long road but I am glad it is working. Thank you for all of your help.
Post Reply