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

所属分类: 脚本专栏 / vbs 阅读数: 286
收藏 0 赞 0 分享
复制代码 代码如下:

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 


更多精彩内容其他人还在看

VBS教程:函数-LCase 函数

VBS教程:函数-LCase 函数
收藏 0 赞 0 分享

VBS教程:函数-LBound 函数

VBS教程:函数-LBound 函数
收藏 0 赞 0 分享

VBS教程:函数-Join 函数

返回一个字符串,此字符串由包含在数组中的许多子字符串联接创建
收藏 0 赞 0 分享

VBS教程:函数-IsObject 函数

VBS教程:函数-IsObject 函数
收藏 0 赞 0 分享

VBS教程:函数-IsNumeric 函数

VBS教程:函数-IsNumeric 函数
收藏 0 赞 0 分享

VBS教程:函数-IsNull 函数

VBS教程:函数-IsNull 函数
收藏 0 赞 0 分享

VBS教程:函数-IsEmpty 函数

VBS教程:函数-IsEmpty 函数
收藏 0 赞 0 分享

VBS教程:函数-IsDate 函数

VBS教程:函数-IsDate 函数
收藏 0 赞 0 分享

VBS教程:函数-IsArray 函数

VBS教程:函数-IsArray 函数
收藏 0 赞 0 分享

VBS教程:函数-Int、Fix 函数

VBS教程:函数-Int、Fix 函数
收藏 0 赞 0 分享
查看更多