<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; CMD/BAT: определение существования процесса.]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=13310&amp;type=atom" />
	<updated>2017-12-18T11:26:20Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=13310</id>
		<entry>
			<title type="html"><![CDATA[Re: CMD/BAT: определение существования процесса.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=122431#p122431" />
			<content type="html"><![CDATA[<p>спасибо</p>]]></content>
			<author>
				<name><![CDATA[im2002]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=28063</uri>
			</author>
			<updated>2017-12-18T11:26:20Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=122431#p122431</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: CMD/BAT: определение существования процесса.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=122426#p122426" />
			<content type="html"><![CDATA[<p>Просто и достаочно надежно<br /></p><div class="codebox"><pre><code>
tasklist | find &quot;1cv8&quot;
</code></pre></div><p>Чуть гибче, но возможны (теоретически) ложные срабатывания<br /></p><div class="codebox"><pre><code>
tasklist | findstr /b &quot;1cv8[cs]*.exe&quot;
</code></pre></div><p>Надежно, но медленно (иногда)<br /></p><div class="codebox"><pre><code>
wmic process where &quot;name like &#039;1cv8%.exe&#039;&quot; get processid,commandline /value
</code></pre></div><p>А дальше анализируйте выхлоп каждой команды в цикле типа for /f и реализуйте свой алогоритм.</p>]]></content>
			<author>
				<name><![CDATA[Rumata]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24846</uri>
			</author>
			<updated>2017-12-17T20:14:21Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=122426#p122426</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[CMD/BAT: определение существования процесса.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=122417#p122417" />
			<content type="html"><![CDATA[<p>можно ли определить наличие процессов 1cv8* (может быть 1cv8.exe и 1cv8c.exe и 1cv8s.exe)<br />пробовал:<br /></p><div class="codebox"><pre><code>tasklist | find &quot;1cv8.exe&quot;
if errorlevel 0 goto YES
tasklist | find &quot;1cv8c.exe&quot;
if errorlevel 0 goto YES
tasklist | find &quot;1cv8s.exe&quot;
if errorlevel 0 goto YES
goto NO
:YES
taskkill /im 1cv8* /f /t
:NO
rem далее идёт скрипт</code></pre></div><p>как-то элегантнее можно?</p>]]></content>
			<author>
				<name><![CDATA[im2002]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=28063</uri>
			</author>
			<updated>2017-12-17T18:26:54Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=122417#p122417</id>
		</entry>
</feed>
