<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic RE: Running curl-command from Blueprism in Product Forum</title>
    <link>https://community.blueprism.com/t5/Product-Forum/Running-curl-command-from-Blueprism/m-p/47222#M3012</link>
    <description>&lt;P&gt;I didnt bother with standard VBOs, just made my own stuff.&lt;/P&gt;
&lt;PRE class="language-markup"&gt;&lt;CODE&gt;Process process = new Process();
process.StartInfo.FileName = cmd;
process.StartInfo.Arguments = args;
process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
process.StartInfo.CreateNoWindow = true;
process.StartInfo.UseShellExecute = false;
process.StartInfo.RedirectStandardOutput = true;
process.StartInfo.RedirectStandardError = true;
process.StartInfo.StandardOutputEncoding = Encoding.GetEncoding(decimal.ToInt32(encoding));
process.StartInfo.StandardErrorEncoding = Encoding.GetEncoding(decimal.ToInt32(encoding));
process.Start();
//* Read the output (or the error)
var output = process.StandardOutput.ReadToEndAsync();
var error = process.StandardError.ReadToEndAsync();
process.WaitForExit();
process.Close();
stdout = output.Result;
stderr = error.Result;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;Then just pass full path to curl in cmd and whatever you need in args, encoding is 65001(UTF-8) for curl binary I think. stderr/stdout is your output streams.&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Andrey Kudinov&lt;BR /&gt;Project Manager&lt;BR /&gt;MobileTelesystems PJSC&lt;BR /&gt;Europe/Moscow&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
    <pubDate>Wed, 02 Jun 2021 08:44:00 GMT</pubDate>
    <dc:creator>AndreyKudinov</dc:creator>
    <dc:date>2021-06-02T08:44:00Z</dc:date>
    <item>
      <title>Running curl-command from Blueprism</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Running-curl-command-from-Blueprism/m-p/47217#M3007</link>
      <description>Hi!&amp;nbsp;

I'm trying to run a Curl-command from within a batch-file using the "Utility - Environment" VBO (Action Start Process). Running the batch-file from command-shell manually runs like charm, but when called from Blueprism I get the following error message: "Internal : Could not execute code stage because exception thrown by code stage: The system cannot find the file specified".

When pausing after batch-file execution I get this message: "c:\windows\system32\curl.exe' is not recognized as an internal or external command"

I suspect this could be a permission related issue.

&amp;nbsp;

Any ideas?

&amp;nbsp;</description>
      <pubDate>Thu, 22 Nov 2018 02:00:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Running-curl-command-from-Blueprism/m-p/47217#M3007</guid>
      <dc:creator>CarstenClaussen</dc:creator>
      <dc:date>2018-11-22T02:00:00Z</dc:date>
    </item>
    <item>
      <title>Hi,
I think that some time…</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Running-curl-command-from-Blueprism/m-p/47218#M3008</link>
      <description>Hi,
I think that some time ago it helped me when I instead used action 'Run Process Until Ended' and provide it 'Working Folder' input.</description>
      <pubDate>Thu, 22 Nov 2018 14:06:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Running-curl-command-from-Blueprism/m-p/47218#M3008</guid>
      <dc:creator>JiriPospisil</dc:creator>
      <dc:date>2018-11-22T14:06:00Z</dc:date>
    </item>
    <item>
      <title>RE: Hi,
I think that some time…</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Running-curl-command-from-Blueprism/m-p/47219#M3009</link>
      <description>Has anyone else had this issue?&lt;BR /&gt;&lt;BR /&gt;I had the same issue when I moved from my dev environment to testing environment.&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Anthony Camargo&lt;BR /&gt;Senior RPA Consultant&lt;BR /&gt;Princeton Blue&lt;BR /&gt;America/New_York&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Wed, 07 Apr 2021 20:35:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Running-curl-command-from-Blueprism/m-p/47219#M3009</guid>
      <dc:creator>AnthonyCamargo</dc:creator>
      <dc:date>2021-04-07T20:35:00Z</dc:date>
    </item>
    <item>
      <title>RE: Hi,
I think that some time…</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Running-curl-command-from-Blueprism/m-p/47220#M3010</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;I struggled with same issue as Anthony. This worked for me:&lt;/P&gt;
&lt;P&gt;Check that following folders contains curl.exe -file:&lt;/P&gt;
&lt;P&gt;C:\Windows\System32\&lt;/P&gt;
&lt;P&gt;C:\Windows\SysWOW64\&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If curl.exe is only at one folder, just make sure that both folders have the same .exe -file.&lt;/P&gt;
&lt;P&gt;
&lt;/P&gt;&lt;P&gt;How this came to mind:&amp;nbsp; .bat (which includes curl) worked fine when launched manually via file explorer but when running it via BP, it claims that cURL is not recognized as a .... command. Seems that File explorer launches cmd.exe in 32bit and BP launches cmd as 64bit and in my case, 64-bit folder did not included the curl.exe -file...&lt;BR /&gt;&lt;BR /&gt;Idk, is this a permanent solution but at least it worked for us!&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Mikko Rahikainen&lt;BR /&gt;RPA Manager&lt;BR /&gt;S-Group&lt;BR /&gt;Europe/Helsinki&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Tue, 01 Jun 2021 13:44:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Running-curl-command-from-Blueprism/m-p/47220#M3010</guid>
      <dc:creator>mikkorah</dc:creator>
      <dc:date>2021-06-01T13:44:00Z</dc:date>
    </item>
    <item>
      <title>RE: Hi,
I think that some time…</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Running-curl-command-from-Blueprism/m-p/47221#M3011</link>
      <description>Thanks for the response!!&lt;BR /&gt;&lt;BR /&gt;To solve this we also intalled the CURL.exe file in a folder and then added the path to the curl.exe to the global environment variable "Path" so that it would be found when opened up from Blue Prism.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Anthony&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Anthony Camargo&lt;BR /&gt;Senior RPA Consultant&lt;BR /&gt;Princeton Blue&lt;BR /&gt;America/New_York&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Tue, 01 Jun 2021 13:51:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Running-curl-command-from-Blueprism/m-p/47221#M3011</guid>
      <dc:creator>AnthonyCamargo</dc:creator>
      <dc:date>2021-06-01T13:51:00Z</dc:date>
    </item>
    <item>
      <title>RE: Running curl-command from Blueprism</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Running-curl-command-from-Blueprism/m-p/47222#M3012</link>
      <description>&lt;P&gt;I didnt bother with standard VBOs, just made my own stuff.&lt;/P&gt;
&lt;PRE class="language-markup"&gt;&lt;CODE&gt;Process process = new Process();
process.StartInfo.FileName = cmd;
process.StartInfo.Arguments = args;
process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
process.StartInfo.CreateNoWindow = true;
process.StartInfo.UseShellExecute = false;
process.StartInfo.RedirectStandardOutput = true;
process.StartInfo.RedirectStandardError = true;
process.StartInfo.StandardOutputEncoding = Encoding.GetEncoding(decimal.ToInt32(encoding));
process.StartInfo.StandardErrorEncoding = Encoding.GetEncoding(decimal.ToInt32(encoding));
process.Start();
//* Read the output (or the error)
var output = process.StandardOutput.ReadToEndAsync();
var error = process.StandardError.ReadToEndAsync();
process.WaitForExit();
process.Close();
stdout = output.Result;
stderr = error.Result;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;Then just pass full path to curl in cmd and whatever you need in args, encoding is 65001(UTF-8) for curl binary I think. stderr/stdout is your output streams.&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Andrey Kudinov&lt;BR /&gt;Project Manager&lt;BR /&gt;MobileTelesystems PJSC&lt;BR /&gt;Europe/Moscow&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Wed, 02 Jun 2021 08:44:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Running-curl-command-from-Blueprism/m-p/47222#M3012</guid>
      <dc:creator>AndreyKudinov</dc:creator>
      <dc:date>2021-06-02T08:44:00Z</dc:date>
    </item>
    <item>
      <title>RE: Running curl-command from Blueprism</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Running-curl-command-from-Blueprism/m-p/47223#M3013</link>
      <description>When not other specified (user profile, environment settings, ...) the shell is opened where cmd.exe is located.&amp;nbsp;&lt;BR /&gt;It should work when working directory is specified.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Alternatively you can use change directories in your script file or use absolute paths.&lt;BR /&gt;If you are into Windows scripting, you can first evaluate the location of the started bat file and then dynamically build the absolute paths.&lt;BR /&gt;&lt;BR /&gt;I would not recommend to copy any files to Windows system folders. I also don't like using PATH environment variables, in the end I won't know where (or which if there are copies) the script file is that was run.&lt;BR /&gt;Sometimes we cannot avoid using scripts. In those cases, we have a well defined folder structure and only use absolute paths. The folder structure is replicated to all of our runtime resources, so we can be sure it will run no matter what.&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Walter Koller&lt;BR /&gt;Solution Manager&lt;BR /&gt;Erste Group IT International GmbH&lt;BR /&gt;Europe/Vienna&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Fri, 02 Jul 2021 16:24:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Running-curl-command-from-Blueprism/m-p/47223#M3013</guid>
      <dc:creator>Walter.Koller</dc:creator>
      <dc:date>2021-07-02T16:24:00Z</dc:date>
    </item>
  </channel>
</rss>

