<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Массовый запуск файлов (.ahk;.exe;.ink;.bat и т.д.)]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=11718&amp;type=atom" />
	<updated>2021-01-24T14:14:08Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=11718</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Массовый запуск файлов (.ahk;.exe;.ink;.bat и т.д.)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=145404#p145404" />
			<content type="html"><![CDATA[<p>Не знаю. Где то на офф форуме было про это, что то про то что AutoHotkey должен быть установлен с UAC, но мне надо было тогда для компилированного, и я не вникал.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2021-01-24T14:14:08Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=145404#p145404</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Массовый запуск файлов (.ahk;.exe;.ink;.bat и т.д.)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=145401#p145401" />
			<content type="html"><![CDATA[<p><strong>serzh82saratov</strong><br />Спасибо. Так работает.<br />А почему не получается реализовать так как описано в Хэлпе?<br />Т.е. с включением режима запуска от администратора для всех ниже идущих ранов с указанием пароля и имени компьютера?</p>]]></content>
			<author>
				<name><![CDATA[BSN201904]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40212</uri>
			</author>
			<updated>2021-01-24T13:55:34Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=145401#p145401</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Массовый запуск файлов (.ahk;.exe;.ink;.bat и т.д.)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=145382#p145382" />
			<content type="html"><![CDATA[<p>Так не пробовали?<br /></p><div class="codebox"><pre><code>
Run cmd.exe
Run *RunAs cmd.exe
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2021-01-24T11:25:29Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=145382#p145382</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Массовый запуск файлов (.ahk;.exe;.ink;.bat и т.д.)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=145381#p145381" />
			<content type="html"><![CDATA[<p>У меня такая же задача (&quot; сделать AHK скрипт, который бы запускал сразу несколько скриптов и плюс некоторые программы, но определённые, от имени Администратора? Хотя сам бы скрипт запускался без UAC запроса.&quot;)<br />Но мне не критично, если будут появляться окна запроса UAC при попытке запустить батник в режиме администратора.<br />Варианты , &quot;RunAs&quot;, описанные в теме, у меня почему-то не работают.<br />Появляется сообщение:<br /><span class="postimg"><img src="https://s8.hostingkartinok.com/uploads/images/2021/01/cdfd10ab8d0598c85053eb3859848c65.jpg" alt="https://s8.hostingkartinok.com/uploads/images/2021/01/cdfd10ab8d0598c85053eb3859848c65.jpg" /></span></p><p>Вот код<br /></p><div class="codebox"><pre><code>#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

RunAs  ; Включаем режим запуска программ от обычного пользователя

Run &quot;E:\Создать виртуальный диск.bat&quot;
Sleep, 10000 ; даём время отработать батнику и закрыть окошко командной строки
;========================================================================
RunAs, Администратор, [здесь мой пароль], @[здесь имя моего компа]  ; Включаем режим запуска программ от администратора

run &quot;E:\Создать виртуальный диск.bat&quot;
Sleep, 2000  
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[BSN201904]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40212</uri>
			</author>
			<updated>2021-01-24T08:33:08Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=145381#p145381</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Массовый запуск файлов (.ahk;.exe;.ink;.bat и т.д.)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=105359#p105359" />
			<content type="html"><![CDATA[<p>Тогда форсированно:<br /></p><div class="codebox"><pre><code>DetectHiddenWindows, On
Scripts = No1,No2,No3
Loop, parse, Scripts, `,
{ Name = %A_LoopField%`.exe
  Complete:
  WinKill, ahk_exe %Name%
  Process,  Exist, % Name
  If ErrorLevel
    Goto, Complete
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Flasher]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27593</uri>
			</author>
			<updated>2016-06-18T12:28:06Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=105359#p105359</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Массовый запуск файлов (.ahk;.exe;.ink;.bat и т.д.)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=105356#p105356" />
			<content type="html"><![CDATA[<p>Flasher, а стоит ли долбить процесс, который не закрывается с первого раза?</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2016-06-18T12:02:57Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=105356#p105356</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Массовый запуск файлов (.ahk;.exe;.ink;.bat и т.д.)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=105351#p105351" />
			<content type="html"><![CDATA[<p><strong>Waveshaper</strong><br />Пардон, не увидел просьбу. Так:<br /></p><div class="codebox"><pre><code>Scripts = No1,No2,No3
Loop, parse, Scripts, `,
{ Name = %A_LoopField%`.exe
  Complete:
  Process, Close, % Name
  Process, Exist, % Name
  If ErrorLevel
    Goto, Complete
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Flasher]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27593</uri>
			</author>
			<updated>2016-06-17T20:51:14Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=105351#p105351</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Массовый запуск файлов (.ahk;.exe;.ink;.bat и т.д.)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=105347#p105347" />
			<content type="html"><![CDATA[<p><strong>Flasher</strong><br />Спасибо, вариант с %A_AhkPath% работает.</p><p>А можете подсказать код для массового закрытия скомпилированных скриптов и вообще .exe? Что-то вроде этого?</p><div class="codebox"><pre><code>Close, No1.exe
Close, No2.exe
Close, No3.exe</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Waveshaper]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33899</uri>
			</author>
			<updated>2016-06-17T18:04:24Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=105347#p105347</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Массовый запуск файлов (.ahk;.exe;.ink;.bat и т.д.)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=105345#p105345" />
			<content type="html"><![CDATA[<p>Ну, вообще странно. Вариант<br /></p><div class="codebox"><pre><code>Run, &lt;путь&gt;\AutoHotkeyU64.exe &lt;путь&gt;\1Task.ahk</code></pre></div><p>должен работать.<br />Ещё так можно:</p><div class="codebox"><pre><code>Run, %A_AhkPath% D:\Загрузки\Progs\AutoHotKey\1Task.ahk</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Flasher]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27593</uri>
			</author>
			<updated>2016-06-17T17:11:16Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=105345#p105345</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Массовый запуск файлов (.ahk;.exe;.ink;.bat и т.д.)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=105344#p105344" />
			<content type="html"><![CDATA[<p><strong>Flasher</strong><br />Ассоциации ведь портативные, а скрипт пытается открыть виндовыми, поэтому только всплывает запрос &quot;Найти приложение в магазине&quot;. По одиночке, конечно, всё открывается корректно в TotalCMD.</p><div class="codebox"><pre><code>Run, D:\Программы\No1.ahk
Sleep 250
Run, D:\Программы\No2.ahk
Sleep 250
Run, D:\Программы\No3.ahk</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Waveshaper]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33899</uri>
			</author>
			<updated>2016-06-17T16:57:49Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=105344#p105344</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Массовый запуск файлов (.ahk;.exe;.ink;.bat и т.д.)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=105343#p105343" />
			<content type="html"><![CDATA[<p><strong>Waveshaper</strong><br />Если *.ahk привязан к&nbsp; AutoHotkeyU64.exe во внутренних ассоциациях, то какие тут могут проблемы?</p>]]></content>
			<author>
				<name><![CDATA[Flasher]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27593</uri>
			</author>
			<updated>2016-06-17T16:51:51Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=105343#p105343</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Массовый запуск файлов (.ahk;.exe;.ink;.bat и т.д.)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=105342#p105342" />
			<content type="html"><![CDATA[<p><strong>Nikva</strong>, <strong>Malcev</strong><br />Спасибо за варианты.</p><p>Решил попробовать использовать AutoHotKey без установки, т.е. в Program Files отсутствует папка и нет системных ассоциаций. А скрипты запускаются с внутренними (портативными) ассоциациями TotalCMD, но вот опять возникла проблема массового запуска и закрытия. Если кто-нибудь знает, подскажите пожалуйста, можно ли запускать скрипты сразу привязывая их к AutoHotkeyU64.exe?</p><br /><p>Вот такой вариант не работает:<br /></p><div class="codebox"><pre><code>Run, D:\Загрузки\Progs\AutoHotKey\AutoHotkeyU64.exe D:\Загрузки\Progs\AutoHotKey\1Task.ahk</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Waveshaper]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33899</uri>
			</author>
			<updated>2016-06-17T16:32:38Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=105342#p105342</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Массовый запуск файлов (.ahk;.exe;.ink;.bat и т.д.)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=105242#p105242" />
			<content type="html"><![CDATA[<p>1) Ваш скрипт не выходит из цикла.<br />2) Он может закрыть сам себя, раньше, чем закроет другие.</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2016-06-15T13:39:17Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=105242#p105242</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Массовый запуск файлов (.ahk;.exe;.ink;.bat и т.д.)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=105241#p105241" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Malcev пишет:</cite><blockquote><p>так неправильно.</p></blockquote></div><p>Коротко и работает, легко запомнить.<br />Особенно хорошо когда, доэкспериментируешся с скриптами типа:<br /></p><div class="fancy_spoiler_switcher"><div class="fancy_spoiler_switcher_header"><strong>+</strong>&nbsp;не запускать, скрипт запускает множество своих копий</div><div class="fancy_spoiler"><div class="codebox"><pre><code>#SingleInstance Off
Loop 
Run, % A_ScriptFullPath</code></pre></div></div></div>]]></content>
			<author>
				<name><![CDATA[Nikva]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27416</uri>
			</author>
			<updated>2016-06-15T13:32:31Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=105241#p105241</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Массовый запуск файлов (.ahk;.exe;.ink;.bat и т.д.)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=105238#p105238" />
			<content type="html"><![CDATA[<p>Nikva, так неправильно. <br />Можно так:<br /></p><div class="codebox"><pre><code>PID:=DllCall(&quot;GetCurrentProcessId&quot;) 
for process in ComObjGet(&quot;winmgmts:&quot;).ExecQuery(&quot;Select * from Win32_Process where name = &#039;Autohotkey.exe&#039; and processID  &lt;&gt; &quot; PID )
   process, close, % process.ProcessId
process, close, % PID</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2016-06-15T10:36:31Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=105238#p105238</id>
		</entry>
</feed>
