<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Run as admin and comspec]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=10012&amp;type=atom" />
	<updated>2014-10-13T07:32:19Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=10012</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Run as admin and comspec]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=87298#p87298" />
			<content type="html"><![CDATA[<p>Может продублировать либо пренести эту тему в раздел:<br />&quot;Прочие скриптовые технологии и близкие к ним&quot;?<br />А то обидно - написал скрипт для проверки не полетело ли виндовское зеркало, а он не пашет при залогиненом пользователе - не админе. <img src="//forum.script-coding.com/img/smilies/sad.png" width="15" height="15" />(((</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2014-10-13T07:32:19Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=87298#p87298</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Run as admin and comspec]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=87141#p87141" />
			<content type="html"><![CDATA[<div class="quotebox"><blockquote><p>Раз не подходит, лучшее что могу предложить - запускать скомпилированный скрипт с правами администратора.</p></blockquote></div><p> Сам скрипт запускается, а вот в нем прописанный </p><div class="codebox"><pre><code>objExec := objShell.Exec(ComSpec &quot; /C echo list volume | C:\Windows\System32\diskpart.exe&quot;)</code></pre></div><p> уже нет. Что сделать?</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2014-10-10T17:14:58Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=87141#p87141</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Run as admin and comspec]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=86926#p86926" />
			<content type="html"><![CDATA[<p>Да, наверное, остановлюсь на этом варианте.<br />Спасибо!</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2014-10-01T11:07:29Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=86926#p86926</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Run as admin and comspec]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=86925#p86925" />
			<content type="html"><![CDATA[<p>Я в Windows XP давно пробовал.<br />В первый раз запросил у меня пароль, а потом перестал запрашивать. Видимо, куда-то сохранил.</p><p>Раз не подходит, лучшее что могу предложить - запускать скомпилированный скрипт с правами администратора.</p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2014-10-01T09:54:02Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=86925#p86925</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Run as admin and comspec]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=86924#p86924" />
			<content type="html"><![CDATA[<p>Так мне надо, чтоб пароль сразу можно было вписать, а не по запросу.</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2014-10-01T08:55:23Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=86924#p86924</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Run as admin and comspec]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=86923#p86923" />
			<content type="html"><![CDATA[<p>Тогда попробуйте RunAs внутри командной строки</p><div class="quotebox"><blockquote><p>RUNAS [ [/noprofile | /profile] [/env] [/netonly] ]<br />&nbsp; &nbsp; &nbsp; &nbsp; /user:&lt;имя пользователя&gt; &lt;программа&gt;</p><p>RUNAS [ [/noprofile | /profile] [/env] [/netonly] ]<br />&nbsp; &nbsp; &nbsp; &nbsp; /smartcard [/user:&lt;имя пользователя&gt;] &lt;программа&gt;</p><p>&nbsp; &nbsp;/noprofile&nbsp; &nbsp; &nbsp; &nbsp; Не загружать профиль пользователя. Это приводит<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;быстрой загрузке приложения, но может стать при<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;неправильной работы некоторых приложений.<br />&nbsp; &nbsp;/profile&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Загружать профиль пользователя.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Этот параметр установлен по умолчанию.<br />&nbsp; &nbsp;/env&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Использовать текущие параметры среды.<br />&nbsp; &nbsp;/netonly&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Учетные данные предназначены только для удаленн<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;доступа.<br />&nbsp; &nbsp;/savecred&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Использовать учетные данные, сохраненные пользо<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Этот параметр не доступен в Windows XP Home Edi<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;и будет проигнорирован.<br />&nbsp; &nbsp;/smartcard&nbsp; &nbsp; &nbsp; &nbsp; Для указания учетных данных используется<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;смарт-карта.<br />&nbsp; &nbsp;/user&nbsp; &nbsp;&lt;имя пользователя&gt; должно быть в виде USER@DOMAIN или DOM<br />&nbsp; &nbsp;&lt;программа&gt;&nbsp; &nbsp; &nbsp; &nbsp;Командная строка для EXE. См. примеры ниже.</p><p>Примеры:<br />&gt; runas /profile /user:mymachine\administrator cmd<br />&gt; runas /profile /env /user:mydomain\admin &quot;mmc %windir%\system32\ds<br />&gt; runas /env /user:user@domain.microsoft.com &quot;notepad \&quot;Мой файл.txt</p><p>Примечание: вводите пароль пользователя только тогда, когда он запра<br />Примечание: формат записи USER@DOMAIN несовместим с параметром /neto<br />Примечание: параметр /profile несовместим с параметром /netonly.</p></blockquote></div><p>В Win7 может отличаться.</p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2014-10-01T08:32:04Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=86923#p86923</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Run as admin and comspec]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=86922#p86922" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>RunAs, domainadmin, password
Run, C:\Windows\System32\diskpart.exe</code></pre></div><p>Выдает: </p><div class="quotebox"><blockquote><p>Error Launch error (possibly related to RunAs)<br />Specifically: The requested operation requires elevation.</p></blockquote></div>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2014-10-01T08:23:30Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=86922#p86922</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Run as admin and comspec]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=86921#p86921" />
			<content type="html"><![CDATA[<p>Пробовали команду <em>RunAs</em> в AutoHotkey и в самой командной строке?</p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2014-10-01T08:00:52Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=86921#p86921</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Run as admin and comspec]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=86920#p86920" />
			<content type="html"><![CDATA[<div class="quotebox"><blockquote><p>Если нужны права админа, то вы это не решите избавлением от таблички. Права-то всё равно нужны.</p></blockquote></div><p>Вот меня и интересует, возможно ли в скрипте их прописать?<br /></p><div class="quotebox"><blockquote><p>Решить проблему можно с помощью планировщика.</p></blockquote></div><p>Спасибо! Попробую разобраться.<br />А просто в скрипте нельзя прописать, по типу RunAS?</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2014-10-01T07:57:21Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=86920#p86920</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Run as admin and comspec]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=86919#p86919" />
			<content type="html"><![CDATA[<p>Решить проблему можно с помощью планировщика. Пароль таки вводить придется, но лишь один раз, при создании задачи. Подробности <a href="http://www.oszone.net/10594#400">тут</a>, способ #4.</p>]]></content>
			<author>
				<name><![CDATA[Irbis]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27384</uri>
			</author>
			<updated>2014-10-01T06:02:22Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=86919#p86919</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Run as admin and comspec]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=86915#p86915" />
			<content type="html"><![CDATA[<p>Если нужны права админа, то вы это не решите избавлением от таблички. Права-то всё равно нужны.</p>]]></content>
			<author>
				<name><![CDATA[YMP]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=81</uri>
			</author>
			<updated>2014-10-01T03:09:52Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=86915#p86915</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Run as admin and comspec]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=86914#p86914" />
			<content type="html"><![CDATA[<p>При запуске этого кода в win7 при залогиненом пользователе - не админе выскакивает табличка UAC ввести пароль администратора.<br />Как бы от нее избавиться?<br /></p><div class="codebox"><pre><code>objShell := ComObjCreate(&quot;WScript.Shell&quot;)
objExec := objShell.Exec(ComSpec &quot; /C echo list volume | C:\Windows\System32\diskpart.exe&quot;)</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2014-10-01T01:54:12Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=86914#p86914</id>
		</entry>
</feed>
