> character in parameters of "Run Program"

Discuss RoboTask here
Post Reply
dbortunk
Posts: 27
Joined: Mon Jun 08, 2009 10:38 am

> character in parameters of "Run Program"

Post by dbortunk »

I have a run program task which runs an exe named adfind.exe . I need to run parameters with this exe but one of them contains the > character and causes problems. It will not run the program correctly when that character is present. The parameters are C:\Apps\AdFind\adfind.exe -f "&(objectcategory=person)(objectclass=user)" pager samaccountname -nodn -nocsvheader -noctl -csvnoq -csv>c:\apps\adfind\INTList.csv

Anyone know why it doesnt work or how to make it work?
Oleg
Site Admin
Posts: 3202
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: > character in parameters of "Run Program"

Post by Oleg »

The string ">c:\apps\adfind\INTList.csv" is NOT a parameter
This means that you redirect output stream to the file c:\apps\adfind\INTList.csv
Your command line is:
C:\Apps\AdFind\adfind.exe -f "&(objectcategory=person)(objectclass=user)" pager samaccountname -nodn -nocsvheader -noctl -csvnoq -csv

What action do you use?
If it is Run Program/Open Document you should use second copy of command processor (CMD.EXE)
Use this command line:
cmd.exe /c C:\Apps\AdFind\adfind.exe -f "&(objectcategory=person)(objectclass=user)" pager samaccountname -nodn -nocsvheader -noctl -csvnoq -csv>c:\apps\adfind\INTList.csv

Also I recommend you to try the action Run Command-Line Utility and use the command line
C:\Apps\AdFind\adfind.exe -f "&(objectcategory=person)(objectclass=user)" pager samaccountname -nodn -nocsvheader -noctl -csvnoq -csv

This action allows to catch the output text into variable. You can save the text later into a file.
Oleg Yershov
dbortunk
Posts: 27
Joined: Mon Jun 08, 2009 10:38 am

Re: > character in parameters of "Run Program"

Post by dbortunk »

I tried to add the CMD /c to the command and use the command line utility option but both error out when i try it. The run program task errors if i put anything after the cmd.exe /c . If i leave cmd.exe /c byt itself it opens a command prompt fine but it wont allow any options
Oleg
Site Admin
Posts: 3202
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: > character in parameters of "Run Program"

Post by Oleg »

It seems you wrote all parameters in "Program/Document name" field.
See screenshot below
commandline.png
commandline.png (53.88 KiB) Viewed 17180 times
Oleg Yershov
Post Reply