当前位置: 首页 > 图文教程 > 脚本技术 > VBScript > 用vbs实现的XP序列号替换器

VBScript
VBS教程:运算符-Xor 运算符
VBS教程:运算符-减运算符 (-)
VBS教程:运算符-Or 运算符
VBS教程:运算符-运算符概述
VBS教程:运算符-运算符优先级
VBS教程:运算符-Not 运算符
VBS教程:运算符-乘运算符 (*)
VBS教程:运算符-Mod 运算符
VBS教程:运算符-逻辑运算符
VBS教程:运算符-Is 运算符
VBS教程:运算符-\ 运算符
VBS教程:运算符-Imp 运算符
VBS教程:运算符-幂运算符 (^)
VBS教程:运算符-Eqv 运算符
VBS教程:运算符-除运算符 (/)
VBS教程:运算符-连接运算符 (&)
VBS教程:运算符-比较运算符
VBS教程:运算符-赋值运算符 (=)
VBS教程:运算符-And 运算符
VBS教程:运算符-运算符(+)

VBScript 中的 用vbs实现的XP序列号替换器


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-11   浏览: 152 ::
收藏到网摘: n/a

复制代码 代码如下:

ON ERROR RESUME NEXT
Dim VOL_PROD_KEY
if Wscript.arguments.count<1 then
VOL_PROD_KEY=InputBox("本程序能帮助您更换 WindowsXP 的序列号。"&vbCr&vbCr&"序列号由您自己寻找并输入。下面列出的不一定是您当前用的序列号,仅作格式参考。"&vbCr&vbCr&"请输入新的序列号:","WindowsXP序列号更换器 by donghai","MRX3F-47B9T-2487J-KWKMF-RPWBY")
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,"-","") 'remove hyphens if any
for each Obj in GetObject("winmgmts:{impersonationLevel=impersonate}").InstancesOf ("win32_WindowsProductActivation")
result = Obj.SetProductKey (VOL_PROD_KEY)
if err = 0 then
Wscript.echo "修改成功。请点击附带的网址到微软网站进行验证。祝您好运!"
end if
if err <> 0 then
Wscript.echo "替换失败!您输入的序列号有误。"
Err.Clear
end if
Next