Dim s
s = InputBox("当前Windows系统序列号为:", "Windows序列号", GetWindowsSN)
WScript.Quit '取得当前Windows序列号函数 Function GetWindowsSN()
Const HKEY_LOCAL_MACHINE = &H80000002
strKeyPath = "SOFTWARE\Microsoft\Windows NT\CurrentVersion"
strValueName = "DigitalProductId"
strComputer = "."
Dim iValues()
Set oReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv")
oReg.GetBinaryValue HKEY_LOCAL_MACHINE, strKeyPath, strValueName, iValues
Dim arrDPID
arrDPID = Array()
For i = To
ReDim Preserve arrDPID( UBound(arrDPID) + )
arrDPID( UBound(arrDPID) ) = iValues(i)
Next
' <--------------- Create an array to hold the valid characters for a microsoft Product Key -------------------------->
Dim arrChars
arrChars = Array("B", "C", "D", "F", "G", "H", "J", "K", "M", "P", "Q", "R", "T", "V", "W", "X", "Y", "", "", "", "", "", "", "") ' <--------------- The clever bit !!! (Decrypt the base24 encoded binary data)-------------------------->
For i = To Step -
k =
For j = To Step -
k = k * Xor arrDPID(j)
arrDPID(j) = Int(k / )
k = k Mod
Next
strProductKey = arrChars(k) & strProductKey
' <------- add the "-" between the groups of 5 Char -------->
If i Mod = And i <> Then strProductKey = "-" & strProductKey
Next
GetWindowsSN = strProductKey
End Function

windows.vbs  通用

获取当前 Windows 的安装序列号的更多相关文章

  1. Windows Server 2012 正式版/标准版/数据中心版安装序列号密钥

    Windows Server 2012(开发代号:Windows Server 8)是微软发布的一款服务器操作系统,也是Windows 8对应的服务器版本,属于是Windows Server 2008 ...

  2. python获取本机的安装所有应用( Windows)

    Windows获取本机的安装所有应用 采用操作注册表的方式,理论上其他可通过操作注册表方式的动作均可 import winreg def get_window_software(hive, flag) ...

  3. 在 Windows 上安装Rabbit MQ 指南

    rabbitMQ是一个在AMQP协议标准基础上完整的,可服用的企业消息系统.他遵循Mozilla Public License开源协议.采用 Erlang 实现的工业级的消息队列(MQ)服务器. Ra ...

  4. windows下 安装Kali Linux到 U盘的方法

    作者:玄魂工作室 \ 2016年10月20日 把Kali Linux安装到U盘好处很多,可以从U盘启动使用整个电脑的硬件资源, 可以随身携带,减少对自己电脑的影响. 今天要给大家讲的是如何在windo ...

  5. windows 下安装redis并且测试(php)

    Window 下安装 下载地址:https://github.com/dmajkic/redis/downloads. 下载到的Redis支持32bit和64bit.根据自己实际情况选择,将64bit ...

  6. 在windows上安装ASP.NET 5(译文)

    本文将介绍如何在windows上安装ASP.NET5,包括单独安装和通过Visual Studio 2015 安装. 本文包括: 通过Visual Studio安装ASP.NET 单独安装ASP.NE ...

  7. windows下安装redis以及测试

    Window 下安装 下载地址:https://github.com/dmajkic/redis/downloads. 下载到的Redis支持32bit和64bit.根据自己实际情况选择,将64bit ...

  8. windows下安装redis以及简单的事例

    1.安装服务端下载地址:http://code.google.com/p/servicestack/wiki/RedisWindowsDownload我下载了一个 redis-2.0.0服务器包,解压 ...

  9. 最新的windows xp sp3序列号(绝对可通过正版验证)

    MRX3F-47B9T-2487J-KWKMF-RPWBY(工行版) 可用(强推此号) QC986-27D34-6M3TY-JJXP9-TBGMD(台湾交大学生版) 可用 CM3HY-26VYW-6J ...

随机推荐

  1. 【转】Solr从数据库导入数据(DIH)

    本文转自:http://blog.csdn.net/xiaoyu714543065/article/details/11849115 一. 数据导入(DataImportHandler-DIH) DI ...

  2. Linux shell脚本编程基础之练习篇

    shell脚本编程基础之练习篇. 1.编写一个脚本使我们在写一个脚本时自动生成”#!/bin/bash”这一行和注释信息. #!/bin/bash ] then echo "请输入一个参数& ...

  3. Delphi经验总结(1)

    先人的DELPHI基础开发技巧 ◇[DELPHI]网络邻居复制文件 uses shellapi; copyfile(pchar('newfile.txt'),pchar('//computername ...

  4. canvas API ,通俗的canvas基础知识(三)

    全文说到了三角形,圆形等相关图形的画法,不熟悉的同学可以出门右转,先看看前文,接下来继续我们的图形——曲线. 学过数学,或者是比较了解js 的同学都知道贝塞尔曲线,当然,在数学里面,这是一门高深的学问 ...

  5. UVALive 7040 Color (容斥原理+逆元+组合数+费马小定理+快速幂)

    题目:传送门. 题意:t组数据,每组给定n,m,k.有n个格子,m种颜色,要求把每个格子涂上颜色且正好适用k种颜色且相邻的格子颜色不同,求一共有多少种方案,结果对1e9+7取余. 题解: 首先可以将m ...

  6. [Android Pro] Android Support 包里究竟有什么

    reference to : http://www.2cto.com/kf/201411/350928.html 随着 Android 5.0 Lollipop 的发布,Android 又为我们提供了 ...

  7. min-height在安卓下不起作用

    正常情况下,min-height可以当height使用 如: <div class="father"> <div class="child"& ...

  8. Fresco 源码分析(三) Fresco服务端处理(3) DataSource到Producer的适配器逻辑以及BitmapMemoryCacheProducer处理的逻辑

    4.3.1.2.1 Producer和DataSource之间适配器处理的逻辑 还是从程序的入口开始说吧 CloseableProducerToDataSourceAdapter.create() 源 ...

  9. linux下绘图工具dia

    官网:https://wiki.gnome.org/Apps/Dia [root@ok Software]# wget --limit-rate=100k ftp://ftp.gnome.org/pu ...

  10. TransactionScope使用说明

    TransactionScope是.Net Framework 2.0滞后,新增了一个名称空间.它的用途是为数据库访问提供了一个“轻量级”[区别于:SqlTransaction]的事物.使用之前必须添 ...