<?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 Check process exists for username? in Product Forum</title>
    <link>https://community.blueprism.com/t5/Product-Forum/Check-process-exists-for-username/m-p/99223#M46806</link>
    <description>&lt;P&gt;​​Hello everyone,&lt;/P&gt;
&lt;P&gt;
&lt;/P&gt;&lt;P&gt;Working with many RPA developers over only a few Virtual Machines(VM), there will often be 3-5 people on the same VM running the same process, e.g. "iexplore".&lt;BR /&gt;&lt;BR /&gt;We all occasionally run into some calculation &amp;amp; decision issues on:&lt;BR /&gt;1. BO: Utility - General, ACTION: Process Exists, then&lt;BR /&gt;2. BO: Close Process Window. (this is an in-house BO that loops to close all but 1 window of an application)&lt;BR /&gt;&lt;BR /&gt;I'm not allowed to mess with step two of the logic, which leaves me with step one. &lt;STRONG&gt;Is there an object/way to determine "Process Exists by User Name"? &lt;/STRONG&gt;Is the only solution using VBA, and if so can anyone point me in the direction of some copy/paste magic?&lt;/P&gt;</description>
    <pubDate>Wed, 14 Apr 2021 00:04:48 GMT</pubDate>
    <dc:creator>PierceClements</dc:creator>
    <dc:date>2021-04-14T00:04:48Z</dc:date>
    <item>
      <title>Check process exists for username?</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Check-process-exists-for-username/m-p/99223#M46806</link>
      <description>&lt;P&gt;​​Hello everyone,&lt;/P&gt;
&lt;P&gt;
&lt;/P&gt;&lt;P&gt;Working with many RPA developers over only a few Virtual Machines(VM), there will often be 3-5 people on the same VM running the same process, e.g. "iexplore".&lt;BR /&gt;&lt;BR /&gt;We all occasionally run into some calculation &amp;amp; decision issues on:&lt;BR /&gt;1. BO: Utility - General, ACTION: Process Exists, then&lt;BR /&gt;2. BO: Close Process Window. (this is an in-house BO that loops to close all but 1 window of an application)&lt;BR /&gt;&lt;BR /&gt;I'm not allowed to mess with step two of the logic, which leaves me with step one. &lt;STRONG&gt;Is there an object/way to determine "Process Exists by User Name"? &lt;/STRONG&gt;Is the only solution using VBA, and if so can anyone point me in the direction of some copy/paste magic?&lt;/P&gt;</description>
      <pubDate>Wed, 14 Apr 2021 00:04:48 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Check-process-exists-for-username/m-p/99223#M46806</guid>
      <dc:creator>PierceClements</dc:creator>
      <dc:date>2021-04-14T00:04:48Z</dc:date>
    </item>
    <item>
      <title>Re: Check process exists for username?</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Check-process-exists-for-username/m-p/99224#M46807</link>
      <description>There are a few examples here which uses powershell, cmd and VB/C# code to kill process launched by specific user. This might be helpful as a reference. &lt;A href="https://stackoverflow.com/questions/426573/how-do-you-kill-a-process-for-a-particular-user-in-net-c" target="test_blank"&gt;https://stackoverflow.com/questions/426573/how-do-you-kill-a-process-for-a-particular-user-in-net-c&lt;/A&gt;</description>
      <pubDate>Wed, 14 Apr 2021 04:11:31 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Check-process-exists-for-username/m-p/99224#M46807</guid>
      <dc:creator>shashank.kumar280</dc:creator>
      <dc:date>2021-04-14T04:11:31Z</dc:date>
    </item>
    <item>
      <title>Re: Check process exists for username?</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Check-process-exists-for-username/m-p/99225#M46808</link>
      <description>Hi Pierce,&lt;BR /&gt;&lt;BR /&gt;some of the standard Blue Prism VBO e.g. 'Utility - General' can not be used in a multi user environment. We uses our own VBO. Mostly you didn't need to know if a process exists for a &lt;STRONG&gt;special user&lt;/STRONG&gt;, but you need to know if a process exists for the &lt;STRONG&gt;current user&lt;/STRONG&gt;. Here is a simple trick to check: Take the session ID of the current logged in user and filter the process list:&lt;BR /&gt;
&lt;PRE class="language-csharp"&gt;&lt;CODE&gt;var currentSessionId = Process.GetCurrentProcess().SessionId;
var process = Process.GetProcessesByName(processName).FirstOrDefault(p =&amp;gt; p.SessionId == currentSessionId);
exists = process != null;
​&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 14 Apr 2021 07:12:30 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Check-process-exists-for-username/m-p/99225#M46808</guid>
      <dc:creator>TobiasArnold</dc:creator>
      <dc:date>2021-04-14T07:12:30Z</dc:date>
    </item>
  </channel>
</rss>

