<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; Как завершить процесс через WSH?]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=5206&amp;type=atom" />
	<updated>2010-11-26T02:37:43Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=5206</id>
		<entry>
			<title type="html"><![CDATA[Re: Как завершить процесс через WSH?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=42242#p42242" />
			<content type="html"><![CDATA[<p>Берём Process Monitor от бывшей Sysinternals, ставим фильтр на создание, запуск и удаление процессов и смотрим, что именно происходит.</p>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2010-11-26T02:37:43Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=42242#p42242</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Как завершить процесс через WSH?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=42241#p42241" />
			<content type="html"><![CDATA[<p>Может увидеть ошибку мешает &quot;on error resume next&quot;? Если есть, отключаем, смотрим что скажет?</p>]]></content>
			<author>
				<name><![CDATA[jite]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=25851</uri>
			</author>
			<updated>2010-11-26T00:01:27Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=42241#p42241</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Как завершить процесс через WSH?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=42227#p42227" />
			<content type="html"><![CDATA[<p>Учетка с правами администратора. Руками процесс тоже убиваеться легко. Более того пример из которого я взял кусок скрипта прекрасно работает, он убивает процесс а потом снова его запускает...?</p>]]></content>
			<author>
				<name><![CDATA[0meg@]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=25256</uri>
			</author>
			<updated>2010-11-25T17:09:10Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=42227#p42227</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Как завершить процесс через WSH?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=42147#p42147" />
			<content type="html"><![CDATA[<p>Угу. «taskkill» работает посредством WMI, так что данная команда — едва ли не слово в слово повторяет скрипт из первого поста.</p>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2010-11-24T14:23:01Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=42147#p42147</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Как завершить процесс через WSH?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=42134#p42134" />
			<content type="html"><![CDATA[<p>Альтернатива:<br /></p><div class="codebox"><pre><code>taskkill /im r_server.exe</code></pre></div><p>Но если скрипту прав не хватило, так видимо и этому не хватит. Но мало ли, может WMI? <br />В некоторых ситуациях, например после &quot;очень неудачного&quot; запроса WMI, wmiprvse.exe вешается с очень хорошей нагрузкой процессора (помогает перезагрузка).</p>]]></content>
			<author>
				<name><![CDATA[jite]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=25851</uri>
			</author>
			<updated>2010-11-24T08:39:04Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=42134#p42134</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Как завершить процесс через WSH?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=42133#p42133" />
			<content type="html"><![CDATA[<p>прав не хватает, либо процесс иначе зовется</p><p>либо так<br /></p><div class="codebox"><pre><code>GetObject(&quot;winmgmts:\\.\root\cimv2:win32_service.name=&#039;r_server&#039;&quot;).stopservice</code></pre></div>]]></content>
			<author>
				<name><![CDATA[smaharbA]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=2911</uri>
			</author>
			<updated>2010-11-24T06:13:53Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=42133#p42133</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Как завершить процесс через WSH?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=42131#p42131" />
			<content type="html"><![CDATA[<p>Необходимо скриптом завершить процесс RAdmin&#039;a, пример с форума почему то не завершает процесс, хотелось бы узнать почему, это особеность самого процесса?</p><div class="codebox"><pre><code>Option Explicit
Dim objWMIService,Processes,Process, CommandLine, WshShell
Set WshShell = CreateObject(&quot;WScript.Shell&quot;)

&#039;Получаем список процессов notepad.exe через WMI
Set objWMIService = GetObject(&quot;winmgmts:\\.\root\cimv2&quot;)
Set Processes = objWMIService.ExecQuery(&quot;SELECT * FROM Win32_Process WHERE Name=&#039;r_server.exe&#039;&quot;)

 If Processes.Count =&gt; 1 Then            
    For Each Process In Processes        
       CommandLine = Process.CommandLine    
       Process.Terminate
    Exit For
 Next
End If</code></pre></div>]]></content>
			<author>
				<name><![CDATA[0meg@]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=25256</uri>
			</author>
			<updated>2010-11-24T06:04:09Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=42131#p42131</id>
		</entry>
</feed>
