如果这个路径存在。我可以判断到值
Dim WshShell,keys
Set WshShell = WScript.CreateObject("WScript.Shell")
keys=wshshell.regread ("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run\Explorer")
if keys<>"qq.exe" then
msgbox("呀呀,没有写进去啊")
end if
那要是路径不存在就会出错。就要加一个判断路径是否存在的语句。。
怎做呢?
[ Last edited by hackhd on 2008-1-27 at 11:34 PM ]
on Error Resume Next
Dim WshShell,keys Set WshShell = WScript.CreateObject("WScript.Shell") keys = wshshell.regread ("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run\Explorer") If Err Then
MsgBox Err.description Else
If keys <> "qq.exe" Then
MsgBox "呀呀,没有写进去啊" End If
End If