获取当前 Windows 的安装序列号
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 的安装序列号的更多相关文章
- Windows Server 2012 正式版/标准版/数据中心版安装序列号密钥
Windows Server 2012(开发代号:Windows Server 8)是微软发布的一款服务器操作系统,也是Windows 8对应的服务器版本,属于是Windows Server 2008 ...
- python获取本机的安装所有应用( Windows)
Windows获取本机的安装所有应用 采用操作注册表的方式,理论上其他可通过操作注册表方式的动作均可 import winreg def get_window_software(hive, flag) ...
- 在 Windows 上安装Rabbit MQ 指南
rabbitMQ是一个在AMQP协议标准基础上完整的,可服用的企业消息系统.他遵循Mozilla Public License开源协议.采用 Erlang 实现的工业级的消息队列(MQ)服务器. Ra ...
- windows下 安装Kali Linux到 U盘的方法
作者:玄魂工作室 \ 2016年10月20日 把Kali Linux安装到U盘好处很多,可以从U盘启动使用整个电脑的硬件资源, 可以随身携带,减少对自己电脑的影响. 今天要给大家讲的是如何在windo ...
- windows 下安装redis并且测试(php)
Window 下安装 下载地址:https://github.com/dmajkic/redis/downloads. 下载到的Redis支持32bit和64bit.根据自己实际情况选择,将64bit ...
- 在windows上安装ASP.NET 5(译文)
本文将介绍如何在windows上安装ASP.NET5,包括单独安装和通过Visual Studio 2015 安装. 本文包括: 通过Visual Studio安装ASP.NET 单独安装ASP.NE ...
- windows下安装redis以及测试
Window 下安装 下载地址:https://github.com/dmajkic/redis/downloads. 下载到的Redis支持32bit和64bit.根据自己实际情况选择,将64bit ...
- windows下安装redis以及简单的事例
1.安装服务端下载地址:http://code.google.com/p/servicestack/wiki/RedisWindowsDownload我下载了一个 redis-2.0.0服务器包,解压 ...
- 最新的windows xp sp3序列号(绝对可通过正版验证)
MRX3F-47B9T-2487J-KWKMF-RPWBY(工行版) 可用(强推此号) QC986-27D34-6M3TY-JJXP9-TBGMD(台湾交大学生版) 可用 CM3HY-26VYW-6J ...
随机推荐
- TestPointer
C++ Code 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 ...
- 卸载Windows服务
在Windows中,有一类程序称为服务,在操作系统内核加载完成后就开始加载.这里程序往往运行在操作系统的底层,因此资源占用比较大.执行效率比较 高,比较有代表性的就是杀毒软件. 但是一旦因为特殊原因不 ...
- 11.python之线程,协程,进程,
一,进程与线程 1.什么是线程 线程是操作系统能够进行运算调度的最小单位.它被包含在进程之中,是进程中的实际运作单位.一条线程指的是进程中一个单一顺序的控制流,一个进程中可以并发多个线程,每条线程并行 ...
- Could not create the view: An unexpected exception was thrown. 电脑突然断电,myeclipse非正常关闭,出现错误
电脑突然断电,myeclipse非正常关闭,“Package Explorer”非正常显示,出现错误“Could not create the view: An unexpected exceptio ...
- python基础——使用dict和set
python基础——使用dict和set dict Python内置了字典:dict的支持,dict全称dictionary,在其它语言中也称为map(映射),使用键-值(key-value)存储,具 ...
- struts2 标签问题----日期显示
对于要显示按照自己的意愿进行显示的话: <s:date name="date" format="yyyy-MM-dd HH:mm:ss.SSS" /> ...
- SWFUpload上传大文件(暂时用用,真正用的时候还是要改的)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...
- hdu 4004 二分 2011大连赛区网络赛D
题意:一个长为L的河,中间有n个石子,小青蛙需要跳少于m次过河,判断小青蛙每次跳跃最大距离的最小值 最大值最小,用二分 Sample Input 6 1 2 2 25 3 3 11 2 18 Samp ...
- mvc-1mvc和类(1)
简单的控制器结构 var Controller = {}; //创建一个users控制器 (Controller.users = function ($) { var nameClick = func ...
- WireShark数据包分析数据封装
WireShark数据包分析数据封装 数据封装(Data Encapsulation)是指将协议数据单元(PDU)封装在一组协议头和尾中的过程.在OSI七层参考模型中,每层主要负责与其它机器上的对等层 ...