Set WshShell=WScript.CreateObject("WScript.Shell")
Key="HKEY_CURRENT_CONFIG\Software\avbs\"
on error resume next
Last=WshShell.RegRead(Key&"Start")
a=split(Last,"\"):LastDay=a(0)
if LastDay=CStr(date()) then
b=a(1):c=a(2)
if c<>"" then
WshShell.Popup "今天内你已经运行了两次,再见! ",5,"警告!",VbExclamation
Wscript.Quit
end if
else
WshShell.RegDelete(Key&"Start")
end if
on error goto 0
if c="" then WshShell.Regwrite(Key&"Start"),date()&"\1\2"
if b="" then WshShell.Regwrite(Key&"Start"),date()&"\1"