<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; VBA: изменение ключа продукта Windows XP]]></title>
		<link>http://forum.script-coding.com/viewtopic.php?id=6055</link>
		<atom:link href="http://forum.script-coding.com/extern.php?action=feed&amp;tid=6055&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «VBA: изменение ключа продукта Windows XP».]]></description>
		<lastBuildDate>Fri, 29 Jul 2011 07:41:34 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: VBA: изменение ключа продукта Windows XP]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=50252#p50252</link>
			<description><![CDATA[<p>разобрался. ему не нравился конкретный ключ. сейчас все работает.<br />Спасибо за помощь.</p>]]></description>
			<author><![CDATA[null@example.com (malegik)]]></author>
			<pubDate>Fri, 29 Jul 2011 07:41:34 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=50252#p50252</guid>
		</item>
		<item>
			<title><![CDATA[Re: VBA: изменение ключа продукта Windows XP]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=50221#p50221</link>
			<description><![CDATA[<div class="quotebox"><cite>alexii пишет:</cite><blockquote><p>В порядке бреда: заглавные/строчные буквы в ключе?</p></blockquote></div><p>неа, тот же результат.</p>]]></description>
			<author><![CDATA[null@example.com (malegik)]]></author>
			<pubDate>Wed, 27 Jul 2011 13:00:18 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=50221#p50221</guid>
		</item>
		<item>
			<title><![CDATA[Re: VBA: изменение ключа продукта Windows XP]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=50219#p50219</link>
			<description><![CDATA[<p>В порядке бреда: заглавные/строчные буквы в ключе?</p>]]></description>
			<author><![CDATA[null@example.com (alexii)]]></author>
			<pubDate>Wed, 27 Jul 2011 09:54:30 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=50219#p50219</guid>
		</item>
		<item>
			<title><![CDATA[Re: VBA: изменение ключа продукта Windows XP]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=50214#p50214</link>
			<description><![CDATA[<p>Скрипт замечательно работает пока я не пытаюсь ввести ключ в скрипте, а не через аргумент. дело в том что это будет вторая часть скрипта который с начала будет проверять какой ключ установленый и потом,&nbsp; если он совподает с ключем на замену должен как раз и отрабатывать эту часть скрипта.&nbsp; <br />может тип не совпадает?</p>]]></description>
			<author><![CDATA[null@example.com (malegik)]]></author>
			<pubDate>Wed, 27 Jul 2011 04:40:55 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=50214#p50214</guid>
		</item>
		<item>
			<title><![CDATA[Re: VBA: изменение ключа продукта Windows XP]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=50198#p50198</link>
			<description><![CDATA[<p>Посмотрел на статьи:<br /><a href="http://support.microsoft.com/kb/328874/ru">Изменение ключа продукта, установленного по корпоративной лицензии, на компьютере под управлением Windows XP с пакетом обновления 1 (SP1)</a><br /><a href="http://support.microsoft.com/kb/918342/ru">Изменение ключа продукта для корпоративного лицензирования на компьютере с Windows XP или Windows Server 2003</a><br />— там именно Ваш вариант с заменой. Возможно, тогда читать это:<br /></p><div class="quotebox"><blockquote><p><strong>Remarks</strong>: This method is only validif the ActivationRequired property is equal to 1.</p></blockquote></div>]]></description>
			<author><![CDATA[null@example.com (alexii)]]></author>
			<pubDate>Tue, 26 Jul 2011 15:56:36 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=50198#p50198</guid>
		</item>
		<item>
			<title><![CDATA[Re: VBA: изменение ключа продукта Windows XP]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=50197#p50197</link>
			<description><![CDATA[<p>Судя по <a href="http://msdn.microsoft.com/en-us/library/aa393588(v=vs.85).aspx">SetProductKey Method of the Win32_WindowsProductActivation Class (Windows)</a>:<br /></p><div class="quotebox"><blockquote><p><em>ProductKey [in]</em></p><p>Unique product key that is licensed for use on the computer. <span style="color: Green">Product keys are alphanumeric strings of 25 characters formatted as follows: xxxxx-xxxxx-xxxxx-xxxxx-xxxxx.</span> The product key must be valid for the media type. Media types include retail, volume-licensing, and OEM.</p></blockquote></div><p>это:<br /></p><div class="quotebox"><blockquote><div class="codebox"><pre><code>VOL_PROD_KEY = Replace(VOL_PROD_KEY,&quot;-&quot;,&quot;&quot;) &#039;удалить дефисы, если они есть</code></pre></div></blockquote></div><p>лишнее.</p>]]></description>
			<author><![CDATA[null@example.com (alexii)]]></author>
			<pubDate>Tue, 26 Jul 2011 15:51:32 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=50197#p50197</guid>
		</item>
		<item>
			<title><![CDATA[VBA: изменение ключа продукта Windows XP]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=50190#p50190</link>
			<description><![CDATA[<p>Добрый день.<br />Есть задача поменять ключ продукта XP на лицензионный. для этого патаюсь переделать скрипт от майкрософта <br /></p><div class="codebox"><pre><code>ON ERROR RESUME NEXT

if Wscript.arguments.count&lt;1 then
   Wscript.echo &quot;Нельзя запустить сценарий без аргумента VolumeProductKey argument&quot;
   Wscript.echo &quot;Правильное использование: Cscript ChangeVLKey.vbs xxxx-xxxxx-xxxxx-xxxxx-xxxxx&quot;
   Wscript.quit
end if

Dim VOL_PROD_KEY
VOL_PROD_KEY = Wscript.arguments.Item(0)
VOL_PROD_KEY = Replace(VOL_PROD_KEY,&quot;-&quot;,&quot;&quot;) &#039;удалить дефисы, если они есть
Dim WshShell
Set WshShell = WScript.CreateObject(&quot;WScript.Shell&quot;)
WshShell.RegDelete &quot;HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WPAEvents\OOBETimer&quot; &#039;delete OOBETimer registry value
for each Obj in GetObject(&quot;winmgmts:{impersonationLevel=impersonate}&quot;).InstancesOf (&quot;win32_WindowsProductActivation&quot;)

   result = Obj.SetProductKey (VOL_PROD_KEY)

   if err &lt;&gt; 0 then
      WScript.Echo Err.Description, &quot;0x&quot; &amp; Hex(Err.Number)
      Err.Clear
   end if

Next</code></pre></div><p>Проблемма в том что если я явно указываю, а не через аргумент&nbsp; VOL_PROD_KEY, то он выдает общую ошибку&nbsp; <br />на строку result = Obj.SetProductKey (VOL_PROD_KEY) </p><div class="codebox"><pre><code>Dim VOL_PROD_KEY
VOL_PROD_KEY = &quot;3KGJ7-JPVFH-2KDK2-BH6CC-RHM8T&quot; 
VOL_PROD_KEY = Replace(VOL_PROD_KEY,&quot;-&quot;,&quot;&quot;) &#039;удалить дефисы, если они есть
WScript.Echo VOL_PROD_KEY
Dim WshShell
Set WshShell = WScript.CreateObject(&quot;WScript.Shell&quot;)
WshShell.RegDelete &quot;HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WPAEvents\OOBETimer&quot; &#039;delete OOBETimer registry value
for each Obj in GetObject(&quot;winmgmts:{impersonationLevel=impersonate}&quot;).InstancesOf (&quot;win32_WindowsProductActivation&quot;)

   result = Obj.SetProductKey (VOL_PROD_KEY)

   if err &lt;&gt; 0 then
      WScript.Echo Err.Description, &quot;0x&quot; &amp; Hex(Err.Number)
      Err.Clear
   end if

Next</code></pre></div><p>подскажите, в чем моя ошибка.</p>]]></description>
			<author><![CDATA[null@example.com (malegik)]]></author>
			<pubDate>Tue, 26 Jul 2011 10:14:53 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=50190#p50190</guid>
		</item>
	</channel>
</rss>
