<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; VBS: запуск программы с ключами из файла]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=14905&amp;type=atom" />
	<updated>2019-08-06T17:32:43Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=14905</id>
		<entry>
			<title type="html"><![CDATA[Re: VBS: запуск программы с ключами из файла]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=135321#p135321" />
			<content type="html"><![CDATA[<p>Полный путь должен браться из вывода wmic. Как я понимаю он должен складываться из двух составляющих: ExecutablePath и CommandLine, например: E:\crypt\btc\bitcoind.exe и bitcoind -datadir=dir\dir1 вместо bitcoind.exe подставляется то, что после равно и получается полный путь: E:\crypt\btc\dir\dir1. <br /> Файл .conf соответственно. <br />bitcoin-cli в том же каталоге где скрипт.</p>]]></content>
			<author>
				<name><![CDATA[steklorez47]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40323</uri>
			</author>
			<updated>2019-08-06T17:32:43Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=135321#p135321</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS: запуск программы с ключами из файла]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=135308#p135308" />
			<content type="html"><![CDATA[<p>В таком случае у Вас и при bitcoind.exe параметр datadir должен содержать <em>полный</em> путь, а не относительный, ибо неизвестно, какой каталог был текущим при запуске bitcoind.exe, и эту информацию напрямую никак не получить. Точно так же, ничего не сказано о том, где расположен bitcoin-cli.exe.</p>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2019-08-06T16:57:36Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=135308#p135308</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[VBS: запуск программы с ключами из файла]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=135289#p135289" />
			<content type="html"><![CDATA[<p>Здравствуйте, уважаемые!<br />На компьютере работает демон bitcoind.exe<br />Команда<br /></p><div class="codebox"><pre><code>wmic process where name=&quot;bitcoind.exe&quot; get CommandLine, ExecutablePath &gt; C:\1.txt</code></pre></div><p>создаёт файл C:\1.txt:<br /></p><div class="quotebox"><blockquote><p>CommandLine&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ExecutablePath&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />bitcoind&nbsp; -datadir=dir1 -conf=bitcoin.conf&nbsp; &nbsp; &nbsp;D:\coins\Bitcoin\bitcoind.exe</p></blockquote></div><p>Задача: Запустить программу &quot;bitcoin-cli.exe&quot; с ключами из текстового файла:<br /></p><div class="codebox"><pre><code>bitcoin-cli -datadir=D:\coins\Bitcoin\dir1 -conf=D:\coins\Bitcoin\bitcoin.conf</code></pre></div><p>т.е. в той же директории и с тем же конфигурационным файлом.</p><p>P.S. Создание промежуточного файла (1.txt) необязательно, если можно обойтись без него.</p>]]></content>
			<author>
				<name><![CDATA[steklorez47]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40323</uri>
			</author>
			<updated>2019-08-06T12:11:46Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=135289#p135289</id>
		</entry>
</feed>
