一個可以更換windows xp or 2003的序列號的vbs腳本
更新時間:2007年02月26日 00:00:00 作者:
將以下代碼復(fù)制到文本文件,另存為vbs文件執(zhí)行就可以了:
'For WinXP SP1 SP2 ,Windows Server 2003
'***************************************************************************
ON ERROR RESUME NEXT
Dim VOL_PROD_KEY
if Wscript.arguments.count<1 then
VOL_PROD_KEY=InputBox("使用說明(OEM版無效):"&vbCr&vbCr&" 本腳本程序?qū)⑿薷漠?dāng)前 Windows 的序列號。請先使用算號器算出匹配當(dāng)前 Windows 的序列號,復(fù)制并粘貼到下面空格中。"&vbCr&vbCr&"輸入序列號(默認為 XP VLK):","Windows XP/2003 序列號更換工具","PJVCV-XCPPF-6GTKK-QXRPY-FBKGJ")
if VOL_PROD_KEY="" then
Wscript.quit
end if
else
VOL_PROD_KEY = Wscript.arguments.Item(0)
end if
VOL_PROD_KEY = Replace(VOL_PROD_KEY,"-","")
for each Obj in GetObject("winmgmts:{impersonationLevel=impersonate}").InstancesOf ("win32_WindowsProductActivation")
result = Obj.SetProductKey (VOL_PROD_KEY)
if err = 0 then
Wscript.echo "您的 Windows CD-KEY 修改成功。請檢查系統(tǒng)屬性。"
end if
if err <> 0 then
Wscript.echo "修改失??!請檢查輸入的 CD-KEY 是否與當(dāng)前 Windows 版本相匹配。"
Err.Clear
end if
Next
復(fù)制代碼 代碼如下:
'For WinXP SP1 SP2 ,Windows Server 2003
'***************************************************************************
ON ERROR RESUME NEXT
Dim VOL_PROD_KEY
if Wscript.arguments.count<1 then
VOL_PROD_KEY=InputBox("使用說明(OEM版無效):"&vbCr&vbCr&" 本腳本程序?qū)⑿薷漠?dāng)前 Windows 的序列號。請先使用算號器算出匹配當(dāng)前 Windows 的序列號,復(fù)制并粘貼到下面空格中。"&vbCr&vbCr&"輸入序列號(默認為 XP VLK):","Windows XP/2003 序列號更換工具","PJVCV-XCPPF-6GTKK-QXRPY-FBKGJ")
if VOL_PROD_KEY="" then
Wscript.quit
end if
else
VOL_PROD_KEY = Wscript.arguments.Item(0)
end if
VOL_PROD_KEY = Replace(VOL_PROD_KEY,"-","")
for each Obj in GetObject("winmgmts:{impersonationLevel=impersonate}").InstancesOf ("win32_WindowsProductActivation")
result = Obj.SetProductKey (VOL_PROD_KEY)
if err = 0 then
Wscript.echo "您的 Windows CD-KEY 修改成功。請檢查系統(tǒng)屬性。"
end if
if err <> 0 then
Wscript.echo "修改失??!請檢查輸入的 CD-KEY 是否與當(dāng)前 Windows 版本相匹配。"
Err.Clear
end if
Next
相關(guān)文章
在vbscript中判斷COM類是否存在的實現(xiàn)代碼
在VBS中,我們有時需要判斷一個COM類是否存在,以便執(zhí)行不同的操作,需要的朋友可以參考下2018-06-06VBScript使用ADSI為IIS批量添加屏蔽或允許訪問的IP
用ADSI+ASP添加IP到IIS禁止訪問列表中2008-12-12VBS教程:VBScript 基礎(chǔ)-VBScript 變量
VBScript只有一種數(shù)據(jù)類型 —— Variant,它是根據(jù)上下文來判斷是數(shù)字還是字符串。因為Variant是VBScript中唯一的數(shù)據(jù)類型,所以它也是VBScript中所有函數(shù)的返回值的數(shù)據(jù)類型2006-11-11