<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; JS: Нужно записать файл в папку из переменнной окружения]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=11544&amp;type=atom" />
	<updated>2016-04-30T23:10:31Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=11544</id>
		<entry>
			<title type="html"><![CDATA[Re: JS: Нужно записать файл в папку из переменнной окружения]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=103219#p103219" />
			<content type="html"><![CDATA[<p>спасибо!</p>]]></content>
			<author>
				<name><![CDATA[trom]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33863</uri>
			</author>
			<updated>2016-04-30T23:10:31Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=103219#p103219</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: JS: Нужно записать файл в папку из переменнной окружения]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=103217#p103217" />
			<content type="html"><![CDATA[<p>Вместо первых трёх:<br /></p><div class="codebox"><pre><code>var put = new ActiveXObject(&#039;WScript.Shell&#039;).Environment(&#039;Process&#039;)(&#039;LOCALAPPDATA&#039;).replace(/\\/g, &#039;\\\\&#039;);</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Flasher]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27593</uri>
			</author>
			<updated>2016-04-30T17:56:19Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=103217#p103217</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[JS: Нужно записать файл в папку из переменнной окружения]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=103215#p103215" />
			<content type="html"><![CDATA[<p>Делаю так, но ничего не пишется подозреваю из за того что символ \ в переменной put не экранирован, но как не пытался не смог это исправить, подскажите как решить проблему ?</p><div class="codebox"><pre><code>var WshShell = WScript.CreateObject(&quot;WScript.Shell&quot;);
var WshSysEnv = WshShell.Environment(&quot;Volatile&quot;);
var put=WshSysEnv(&quot;LOCALAPPDATA&quot;);
 
var stream = new ActiveXObject(&quot;ADODB.Stream&quot;);
stream.type = 1; 
stream.open();
stream.write(objSrvHTTP.responseBody);
stream.saveToFile(put+&quot;\\1.txt&quot;);
stream.close();
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[trom]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33863</uri>
			</author>
			<updated>2016-04-30T15:30:08Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=103215#p103215</id>
		</entry>
</feed>
