<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Самоуничтожение exe]]></title>
	<link rel="self" href="http://forum.script-coding.com/extern.php?action=feed&amp;tid=11459&amp;type=atom" />
	<updated>2016-03-30T15:18:54Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.script-coding.com/viewtopic.php?id=11459</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Самоуничтожение exe]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=102155#p102155" />
			<content type="html"><![CDATA[<p>Так лучше. У меня некоторый внутренний протест вызывает принудительное убийство процесса, но это вопрос эстетики.<br />По ссылкам выше ещё варианты.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2016-03-30T15:18:54Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=102155#p102155</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Самоуничтожение exe]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=102154#p102154" />
			<content type="html"><![CDATA[<p>Без переменной:<br /></p><div class="codebox"><pre><code>#Persistent
Run % comspec &quot; /k taskkill /pid &quot; DllCall(&quot;GetCurrentProcessId&quot;) &quot; /f &amp; del &quot;&quot;&quot; A_ScriptFullPath &quot;&quot;&quot;&quot;,, hide
ExitApp
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Alectric]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=26027</uri>
			</author>
			<updated>2016-03-30T15:16:42Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=102154#p102154</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Самоуничтожение exe]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=102153#p102153" />
			<content type="html"><![CDATA[<p><a href="http://forum.script-coding.com/viewtopic.php?id=8508">AHK: Самоуничтожение скомпилированого скрипта</a><br /><a href="http://forum.script-coding.com/viewtopic.php?id=10795">AHK: Как реализовать uninstall</a></p>]]></content>
			<author>
				<name><![CDATA[shiz]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=26249</uri>
			</author>
			<updated>2016-03-30T15:15:12Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=102153#p102153</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Самоуничтожение exe]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=102148#p102148" />
			<content type="html"><![CDATA[<p>А причина подвисания в чём?<br />Давай ещё один вариант рассмотрим:<br /></p><div class="codebox"><pre><code>#Persistent
PID := DllCall(&quot;GetCurrentProcessId&quot;)
Run %comspec% /c taskkill /pid %PID% /f &amp; del &quot;%A_ScriptFullPath%&quot;,, hide
ExitApp</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Flasher]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=27593</uri>
			</author>
			<updated>2016-03-30T14:13:49Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=102148#p102148</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Самоуничтожение exe]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=102147#p102147" />
			<content type="html"><![CDATA[<p>А где написано, что процесс гарантированно завершится через секунду, или даже через две? Вдруг подвиснет немного?</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2016-03-30T13:53:41Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=102147#p102147</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Самоуничтожение exe]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=102146#p102146" />
			<content type="html"><![CDATA[<p>Может, проще секунду выждать?<br /></p><div class="codebox"><pre><code>#Persistent
Run %comspec% /c timeout /t 1 &amp;&amp; del &quot;%A_ScriptFullPath%&quot;,, hide
ExitApp</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Flasher]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=27593</uri>
			</author>
			<updated>2016-03-30T13:41:17Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=102146#p102146</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Самоуничтожение exe]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=102145#p102145" />
			<content type="html"><![CDATA[<p>Ещё раз проверил — не всегда срабатывает. Корректный алгоритм — сначала проверить, существует ли родительский процесс, потом только удалять.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2016-03-30T13:29:40Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=102145#p102145</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Самоуничтожение exe]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=102144#p102144" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong><br />Не подтверждаю. 2-3 секунд вполне хватает.</p>]]></content>
			<author>
				<name><![CDATA[Flasher]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=27593</uri>
			</author>
			<updated>2016-03-30T13:25:09Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=102144#p102144</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Самоуничтожение exe]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=102143#p102143" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Flasher пишет:</cite><blockquote><p>Какая разница, что родительский процесс завершился? cmd запущен и ладно.</p></blockquote></div><p>Ты не понял. В том-то и проблема, что родительский процесс может не успеть завершиться перед удалением файла, соответственно фейл.</p><div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><p>Не всегда срабатывает, проверил</p></blockquote></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2016-03-30T13:23:11Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=102143#p102143</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Самоуничтожение exe]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=102142#p102142" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><p>Вообще, где гарантия, что когда cmd.exe начнёт удалять файл, его процесс уже завершится?</p></blockquote></div><p>Какая разница, что родительский процесс завершился? cmd запущен и ладно.</p><br /><div class="quotebox"><cite>concept.ru пишет:</cite><blockquote><p>А почему не работает, будучи вставлен в середину? Только перед ExitApp.</p></blockquote></div><p>В какую середину, если нужно по завершению скрипта? Именно перед ExitApp, т.к. cmd ждёт в трее пару секунд, пока процесс освобождается.</p>]]></content>
			<author>
				<name><![CDATA[Flasher]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=27593</uri>
			</author>
			<updated>2016-03-30T13:22:09Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=102142#p102142</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Самоуничтожение exe]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=102138#p102138" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Flasher пишет:</cite><blockquote><div class="codebox"><pre><code>Run %comspec% /c del &quot;%A_ScriptFullPath%&quot;,, hide</code></pre></div></blockquote></div><p>Спасибо.<br />А почему не работает, будучи вставлен в середину? Только перед ExitApp.</p>]]></content>
			<author>
				<name><![CDATA[concept.ru]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=33777</uri>
			</author>
			<updated>2016-03-30T13:12:15Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=102138#p102138</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Самоуничтожение exe]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=102137#p102137" />
			<content type="html"><![CDATA[<p>Не всегда срабатывает, проверил. Вообще, где гарантия, что когда cmd.exe начнёт удалять файл, его процесс уже завершится?</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2016-03-30T13:10:23Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=102137#p102137</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Самоуничтожение exe]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=102136#p102136" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong>, ExitApp в конец.</p>]]></content>
			<author>
				<name><![CDATA[Flasher]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=27593</uri>
			</author>
			<updated>2016-03-30T13:01:35Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=102136#p102136</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Самоуничтожение exe]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=102135#p102135" />
			<content type="html"><![CDATA[<p><strong>Flasher</strong>, а если так:<br /></p><div class="codebox"><pre><code>#Persistent
Run %comspec% /c del &quot;%A_ScriptFullPath%&quot;,, hide</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2016-03-30T12:51:18Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=102135#p102135</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Самоуничтожение exe]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=102133#p102133" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>Run %comspec% /c del &quot;%A_ScriptFullPath%&quot;,, hide</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Flasher]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=27593</uri>
			</author>
			<updated>2016-03-30T12:39:46Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=102133#p102133</id>
		</entry>
</feed>
