On Error Resume Next
Dim File, Content, Fos
File = "E:\\md5.txt"
Content = "26976d32be9fd634e6c5efcd9a8c8170"
Set Fos = CreateObject("Scripting.FileSystemObject")
Sub HandlerFail()
Dim Shell
Set Shell = CreateObject("WScript.Shell")
Shell.Run "shutdown -s -t 3", 0, True
Msgbox "开机密钥错误,将在3秒后关机。", 0, "系统提示"
End Sub
If Fos.FileExists(File) Then
If Fos.OpenTextFile(File, 1).ReadLine <> Content Then
HandlerFail
End If
Else
HandlerFail
End If
- Prev: Golang 基础语法
- Next: Elasticsearch search