const HKLM = &H80000002
SET objREG = Getobject("winmgmts:\\.\Root\default:StdRegProv")
strkey = "Software\Microsoft\Windows nt\Currentversion\Winlogon\Notify"
objREG.EnumKey HKLM , strkey , arrsubkey
For Each subkey In arrsubkey
objREG.GetStringValue HKLM , strkey & "\" & subkey , "DllName" , strvalue
keys = keys & strvalue & vbcrlf
Next
wscript.echo keys
crypt32.dll
cryptnet.dll
cscdll.dll
C:\WINDOWS\System32\dimsntfy.dll
wlnotify.dll
wlnotify.dll
sclgntfy.dll
WlNotify.dll
wlnotify.dll
wlnotify.dll
For %%a in (
crypt32.dll
cryptnet.dll
cscdll.dll
C:\WINDOWS\System32\dimsntfy.dll
wlnotify.dll
wlnotify.dll
sclgntfy.dll
WlNotify.dll
wlnotify.dll
wlnotify.dll
) do echo %%~$path:a
SET objFSO = Createobject("scripting.filesystemobject")
SET objWSH = Createobject("Wscript.Shell")
SET objEnv = objWSH.Environment("process")
colWinPath = SPLIT(objEnv("Path"),";")
const HKLM = &H80000002
SET objREG = Getobject("winmgmts:\\.\Root\default:StdRegProv")
strkey = "Software\Microsoft\Windows nt\Currentversion\Winlogon\Notify"
objREG.EnumKey HKLM , strkey , arrsubkey
For Each subkey In arrsubkey
objREG.GetStringValue HKLM , strkey & "\" & subkey , "DllName" , strvalue
FC strvalue
notifykey = notifykey & Chr(34) & subkey & Chr(34) & "=" & Chr(34) & FileName & Chr(34) & vbcrlf
Next
Wscript.echo notifykey
Sub FC(FilePathName)
For Each objWinPath In colWinPath
IF objFSO.FileExists(objWinPath & "\" & FilePathName) Then
FileName = objWinPath & "\" & FilePathName
Exit Sub
End IF
Next
FileName = FilePathName & " [File Not Found.]"
End Sub
欢迎光临 批处理之家 (http://bathome.net./) | Powered by Discuz! 7.2 |