<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; VBS: Перевести скрипт на .Reg в скрипт в VB]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=11122&amp;type=atom" />
	<updated>2015-12-07T09:22:59Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=11122</id>
		<entry>
			<title type="html"><![CDATA[Re: VBS: Перевести скрипт на .Reg в скрипт в VB]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=99565#p99565" />
			<content type="html"><![CDATA[<p>решено</p>]]></content>
			<author>
				<name><![CDATA[shade45]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33296</uri>
			</author>
			<updated>2015-12-07T09:22:59Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=99565#p99565</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS: Перевести скрипт на .Reg в скрипт в VB]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=99514#p99514" />
			<content type="html"><![CDATA[<p><strong>mozers</strong> это hex значения из .reg, сейчас поправлю</p>]]></content>
			<author>
				<name><![CDATA[shade45]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33296</uri>
			</author>
			<updated>2015-12-04T09:45:44Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=99514#p99514</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS: Перевести скрипт на .Reg в скрипт в VB]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=99512#p99512" />
			<content type="html"><![CDATA[<p>А че это за значение такое? В VB пишут <span style="color: blue">&amp;H0a</span>. Ну или в десятичные числа переводи.</p>]]></content>
			<author>
				<name><![CDATA[mozers]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=4112</uri>
			</author>
			<updated>2015-12-04T08:48:09Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=99512#p99512</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[VBS: Перевести скрипт на .Reg в скрипт в VB]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=99508#p99508" />
			<content type="html"><![CDATA[<p>Есть .reg скрипт для перевода времени на компьютерах c xp.</p><div class="codebox"><pre><code>Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Ekaterinburg Standard Time]
&quot;Display&quot;=&quot;(GMT+05:00) Екатеринбург (RTZ 4)&quot;
&quot;Dlt&quot;=&quot;RTZ 4 (лето)&quot;
&quot;Std&quot;=&quot;RTZ 4 (зима)&quot;
&quot;MapID&quot;=&quot;10,11&quot;
&quot;Index&quot;=dword:000000b4
&quot;TZI&quot;=hex:d4,fe,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Ekaterinburg Standard Time\Dynamic DST]
&quot;2010&quot;=hex:d4,fe,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,0a,00,00,00,05,00,03,00,\
  00,00,00,00,00,00,00,00,03,00,00,00,05,00,02,00,00,00,00,00,00,00
&quot;2011&quot;=hex:d4,fe,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,01,00,06,00,01,00,00,00,\
  00,00,00,00,00,00,00,00,03,00,00,00,05,00,02,00,00,00,00,00,00,00
&quot;FirstEntry&quot;=dword:000007da
&quot;LastEntry&quot;=dword:000007df
&quot;2012&quot;=hex:98,fe,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
&quot;2013&quot;=hex:98,fe,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
&quot;2014&quot;=hex:d4,fe,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,0a,00,00,00,05,00,02,00,\
  00,00,00,00,00,00,00,00,01,00,03,00,01,00,00,00,00,00,00,00,00,00
&quot;2015&quot;=hex:d4,fe,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Russian Standard Time]
&quot;Display&quot;=&quot;(GMT+03:00) Волгоград, Москва, Санкт-Петербург (RTZ 2)&quot;
&quot;Dlt&quot;=&quot;RTZ 2 (лето)&quot;
&quot;Std&quot;=&quot;RTZ 2 (зима)&quot;
&quot;MapID&quot;=&quot;6,7&quot;
&quot;Index&quot;=dword:00000091
&quot;TZI&quot;=hex:4c,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Russian Standard Time\Dynamic DST]
&quot;2010&quot;=hex:4c,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,0a,00,00,00,05,00,03,00,\
  00,00,00,00,00,00,00,00,03,00,00,00,05,00,02,00,00,00,00,00,00,00
&quot;2011&quot;=hex:4c,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,01,00,06,00,01,00,00,00,\
  00,00,00,00,00,00,00,00,03,00,00,00,05,00,02,00,00,00,00,00,00,00
&quot;FirstEntry&quot;=dword:000007da
&quot;LastEntry&quot;=dword:000007df
&quot;2012&quot;=hex:10,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
&quot;2013&quot;=hex:10,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
&quot;2014&quot;=hex:4c,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,0a,00,00,00,05,00,02,00,\
  00,00,00,00,00,00,00,00,01,00,03,00,01,00,00,00,00,00,00,00,00,00
&quot;2015&quot;=hex:4c,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00</code></pre></div><p>Пытаюсь сделать его работающим по сети:</p><div class="codebox"><pre><code>Sub TimeZoneChange
	const HKEY_LOCAL_MACHINE = &amp;H80000002
	values = Array(d4,fe,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00)
	values2 = Array(d4,fe,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,0a,00,00,00,05,00,03,00,00,00,00,00,00,00,00,00,03,00,00,00,05,00,02,00,00,00,00,00,00,00)
  values3 = Array(d4,fe,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,01,00,06,00,01,00,00,00,00,00,00,00,00,00,00,00,03,00,00,00,05,00,02,00,00,00,00,00,00,00)
  values4 = Array(98,fe,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00)
  values5 = Array(98,fe,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00)
  values6 = Array(d4,fe,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,0a,00,00,00,05,00,02,00,00,00,00,00,00,00,00,00,01,00,03,00,01,00,00,00,00,00,00,00,00,00)
  values7 = Array(d4,fe,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00)
  values8 = (4c,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00)
  value9 = (4c,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,0a,00,00,00,05,00,03,00,00,00,00,00,00,00,00,00,03,00,00,00,05,00,02,00,00,00,00,00,00,00)
  value10 = (4c,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,01,00,06,00,01,00,00,00,00,00,00,00,00,00,00,00,03,00,00,00,05,00,02,00,00,00,00,00,00,00)
  value11 = (10,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00)
  value12 =(10,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00)
  value13 =(4c,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,0a,00,00,00,05,00,02,00,00,00,00,00,00,00,00,00,01,00,03,00,01,00,00,00,00,00,00,00,00,00)
  value14 =(4c,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00)

	sRemoteComputerName = ComputerName.value
	strKeyPath  = &quot;SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Ekaterinburg Standard Time&quot;
	strKeyPath2 = &quot;SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Ekaterinburg Standard Time\Dynamic DST&quot;
	strKeyPath3 = &quot;SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Russian Standard Time&quot;
	strKeyPath4 = &quot;SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Russian Standard Time\Dynamic DST&quot;
	Set oReg=GetObject(&quot;winmgmts:{impersonationLevel=impersonate}!\\&quot; &amp; sRemoteComputerName &amp; &quot;\root\default:StdRegProv&quot;)
	oReg.SetStringValue &amp;H80000002,strKeyPath,&quot;Display&quot;,&quot;(GMT+05:00) Екатеринбург (RTZ 4)&quot;
	oReg.SetStringValue &amp;H80000002,strKeyPath,&quot;Dlt&quot;,&quot;RTZ 4 (лето)&quot;
	oReg.SetStringValue &amp;H80000002,strKeyPath,&quot;Std&quot;,&quot;RTZ 4 (зима)&quot;
	oReg.SetStringValue &amp;H80000002,strKeyPath,&quot;MapID&quot;,&quot;10,11&quot;
	oReg.SetDWORDValue  &amp;H80000002,strKeyPath,&quot;Index&quot;,000000b4
	oReg.SetBINARYValue &amp;H80000002,strKeyPath,&quot;TZI&quot;,  values &#039;
	oReg.SetBINARYValue &amp;H80000002,strKeyPath2,&quot;2010&quot;,values2
	oReg.SetBINARYValue &amp;H80000002,strKeyPath2,&quot;2011&quot;,values3
	oReg.SetDWORDValue  &amp;H80000002,strKeyPath2,&quot;FirstEntry&quot;,000007da
	oReg.SetDWORDValue  &amp;H80000002,strKeyPath2,&quot;LastEntry&quot;, 000007df
	oReg.SetBINARYValue  &amp;H80000002,strKeyPath2,&quot;2012&quot;,values4
	oReg.SetBINARYValue  &amp;H80000002,strKeyPath2,&quot;2013&quot;,values5
	oReg.SetBINARYValue  &amp;H80000002,strKeyPath2,&quot;2014&quot;,values6
	oReg.SetBINARYValue  &amp;H80000002,strKeyPath2,&quot;2015&quot;,values7
	oReg.SetStringValue  &amp;H80000002,strKeyPath3,&quot;Display&quot;,&quot;(GMT+03:00) Волгоград, Москва, Санкт-Петербург (RTZ 2)&quot;
	oReg.SetStringValue  &amp;H80000002,strKeyPath3,&quot;Dlt&quot;,&quot;RTZ 2 (лето)&quot;
	oReg.SetStringValue  &amp;H80000002,strKeyPath3,&quot;Std&quot;,&quot;RTZ 2 (зима)&quot;
	oReg.SetStringValue  &amp;H80000002,strKeyPath3,&quot;MapID&quot;,&quot;6,7&quot;
	oReg.SetDWORDValue  &amp;H80000002,strKeyPath3,&quot;Index&quot;,00000091
	oReg.SetBINARYValue &amp;H80000002,strKeyPath3,&quot;TZI&quot;,values8
	oReg.SetBINARYValue &amp;H80000002,strKeyPath4,&quot;2010&quot;,value9
	oReg.SetBINARYValue &amp;H80000002,strKeyPath4,&quot;2011&quot;,values10
	oReg.SetDWORDValue &amp;H80000002,strKeyPath4,&quot;FirstEntry&quot;,000007da
	oReg.SetDWORDValue &amp;H80000002,strKeyPath4,&quot;LastEntry&quot;,000007df
	oReg.SetBINARYValue &amp;H80000002,strKeyPath4,&quot;2012&quot;,values11
	oReg.SetBINARYValue &amp;H80000002,strKeyPath4,&quot;2013&quot;,values12
	oReg.SetBINARYValue &amp;H80000002,strKeyPath4,&quot;2014&quot;,values13
	oReg.SetBINARYValue &amp;H80000002,strKeyPath4,&quot;2015&quot;,values14
	End sub</code></pre></div><p>Ругается на строчку где есть, значение - 0a, можно ли это решить?</p><div class="codebox"><pre><code>
Reg:
&quot;2010&quot;=hex:d4,fe,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,0a,00,00,00,05,00,03,00,\
  00,00,00,00,00,00,00,00,03,00,00,00,05,00,02,00,00,00,00,00,00,00

VB:
values2 = Array(d4,fe,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,0a,00,00,00,05,00,03,00,00,00,00,00,00,00,00,00,03,00,00,00,05,00,02,00,00,00,00,00,00,00)</code></pre></div>]]></content>
			<author>
				<name><![CDATA[shade45]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33296</uri>
			</author>
			<updated>2015-12-04T03:00:26Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=99508#p99508</id>
		</entry>
</feed>
