反复看来不知道那里出错了
以下是vbs脚本- strComputer = "."
- strOut = ""
- Set objWMIService = GetObject("winmgmts:" _
- & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
- Set colDiskDrives = objWMIService.ExecQuery _
- ("Select * from Win32_DiskDrive")
- For each objDiskDrive in colDiskDrives
- strOut = strOut & " " & vbTab & objDiskDrive.Signature
- Next
- Wscript.Echo strOut-strOut-strOut '这里是硬盘的序列号(去掉 - 号) 这句可以不用
-
- dim a,s
- s=0 '设置计数器
- set m = strOut-strOut-strOut-3*7 '工具硬盘序列号 添加复杂一点的密码
- do
- a=inputbox("请输入暗码")
- if a=m then
- msgbox "认证成功"
- exit do
- else
- if s=1 then '设置认证次数为1
- msgbox "已经达到认证上限, 认证程序关闭"
- exit do
- else
- s=s+1 '注意:这一句是赋值句,要从右往左读,即每出错一次就把s加上1,然后再放回s里面,使得这个变量加1
- msgbox "认证出错, 请检查暗码"
- end if
- end if
- loop
复制代码
|