js脚本屏蔽广告每日首冲进图

发布时间:2020-06-30 来源:脚本之家 点击:

在这种情况下,可将该表的KeepLocal属性设为“T”,使得复制数据库时,这些信息不被复制
'Lilo编写
'Lilo@Bugkidz.org
OnErrorResumeNext
DimoArgs,ArgNum,ArgComputer,ArgWebSites,ArgVirtualDirs,ArgDirNames(),ArgDirPaths(),DirIndex,ArgComputers

SetoArgs=WScript.Arguments
ArgComputers=Array("LocalHost")

ArgNum=0
WhileArgNum<oArgs.Count

If(ArgNum+1)>=oArgs.CountThen
CallDisplayUsage
EndIf
SelectCaseLCase(oArgs(ArgNum))
Case"-w":
ArgNum=ArgNum+1
ArgWebSites=oArgs(ArgNum)
Case"-v":
ArgNum=ArgNum+1
ArgVirtualDirs=Split(oArgs(ArgNum),",",-1)
Case"-?"
CallDisplayUsage
EndSelect
ArgNum=ArgNum+1
Wend
ArgNum=0
DirIndex=0
MaxWeb=CLng(ListAllWeb(0))
IfNotIsNumeric(ArgWebSites)OrMaxWeb=0ThenCallDisplayUsage
ReDimArgDirNames((UBound(ArgVirtualDirs)+1)\2)
ReDimArgDirPaths((UBound(ArgVirtualDirs)+1)\2)

ifisArray(ArgVirtualDirs)then
WhileArgNum<=UBound(ArgVirtualDirs)
ArgDirNames(DirIndex)=ArgVirtualDirs(ArgNum)
If(ArgNum+1)>UBound(ArgVirtualDirs)Then
WScript.Echo"Errorunderstandingvirtualdirectories"
CallDisplayUsage
EndIf
ArgNum=ArgNum+1
ArgDirPaths(DirIndex)=ArgVirtualDirs(ArgNum)
ArgNum=ArgNum+1
DirIndex=DirIndex+1
Wend
endif

If(ArgWebSites="")Or(IsArray(ArgDirNames)=FalseorIsArray(ArgDirPaths)=False)Then
CallDisplayUsage
Else
DimcompIndex
forcompIndex=0toUBound(ArgComputers)
CallASTCreateVirtualWebDir(ArgComputers(compIndex),ArgWebSites,ArgDirNames,ArgDirPaths)
next
EndIf

SubDisplay(Msg)
WScript.EchoNow&".ErrorCode:"&Hex(Err)&"-"&Msg
EndSub

SubTrace(Msg)
WScript.EchoNow&":"&Msg
EndSub

SubDisplayUsage()
WScript.EchoString(75,"*")&vbCrLf&"Usage:MDir<-wWebSiteIndex>"&vbCrLf&"<-vName1,Path1,Name2,Path2,...>"&vbCrLf&"Example:MDir-w1-v""Root/Disk-C"",""C:"",""Root/Disk-D"",""D:"""&vbCrLf&String(75,"*")&vbCrLf&ListAllWeb(1)
WScript.Quit
EndSub

SubASTCreateVirtualWebDir(ComputerName,WebSiteName,DirNames,DirPaths)
DimComputer,webSite,WebSiteID,vRoot,vDir,DirNum
OnErrorResumeNext
SetwebSite=GetObject(""&WebSiteName)
ifIsObject(webSite)then
setvRoot=webSite.GetObject("IIsWebVirtualDir","Root")
Trace"AccessingRootFor"&webSite.ADsPath
If(Err<>0)Then
Display"UnableToAccessRootfor"&webSite.ADsPath
Else
DirNum=0
If(IsArray(DirNames)=True)And(IsArray(DirPaths)=True)And(UBound(DirNames)=UBound(DirPaths))Then
WhileDirNum<UBound(DirNames)
SetvDir=vRoot.Create("IIsWebVirtualDir",DirNames(DirNum))
If(Err<>0)Then
Display"UnableToCreate"&vRoot.ADsPath&"/"&DirNames(DirNum)&"."
Else
vDir.EnableDirBrowsing=True
vDir.DirBrowseShowDate=False
vDir.DirBrowseShowTime=False
vDir.DirBrowseShowSize=False
vDir.DirBrowseShowExtension=False
vDir.DirBrowseShowLongDate=True
vDir.DirBrowseFlags=-1073741762
vDir.AccessRead=True
vDir.AccessWrite=False
vDir.AccessExecute=False
vDir.AccessScript=False
vDir.AccessSource=False
vDir.AccessNoRemoteRead=False
vDir.AccessNoRemoteWrite=False
vDir.AccessNoRemoteExecute=False
vDir.AccessNoRemoteScript=False
vDir.AppIsolated=1
vDir.AccessFlags=1
vDir.ContentIndexed=False
vDir.CreateProcessasUser=False
vDir.DontLog=True
'vDir.DefaultDoc=""
vDir.EnableDefaultDoc=False
vDir.AppFriendlyName=""
vDir.AppCreate23
vDir.Path=DirPaths(DirNum)
If(Err<>0)Then
Display"UnableToBindPath"&DirPaths(DirNum)&"to"&vRootName&"/"&DirNames(DirNum)&".Pathmaybeinvalid."
Else
'Savethechanges
vDir.SetInfo
If(Err<>0)Then
Display"UnableToSaveConfigurationFor"&vRootName&"/"&DirNames(DirNum)&"."
Else
Trace"WebVirtualDirectory"&vRootName&"/"&DirNames(DirNum)&"createdsuccessfully."
EndIf
EndIf
EndIf
Err=0
DirNum=DirNum+1
Wend
EndIf
EndIf
else
Display"UnableToFind"&WebSiteName&"on"&ComputerName
Endif
Trace"Done."
EndSub

FunctionListAllWeb(n)
SetObjService=GetObject("")
Ifn=1ThenListAllWeb=""ElseListAllWeb=0
ForEachobj3wInobjservice
IfIsNumeric(obj3w.Name)Then
sServerName=Obj3w.ServerComment
Ifn=1Then
ListAllWeb=ListAllWeb&obj3w.Name&String(15-Len(obj3w.Name),"")&obj3w.ServerComment&vbCrLf
Else
ListAllWeb=ListAllWeb+1
EndIf
EndIf
Next
ifn=1ThenListAllWeb="Index"&String(10,"")&"ServerComment"&vbCrLf&String(75,"_")&vbCrLf&ListAllWeb
SetObjService=Nothing
EndFunction

青灯脚本

if(lcase(right(wscript.fullname,11))="wscript.exe")then
setobjshell=wscript.createobject("wscript.shell")
objshell.run("cmd.exe/kcscript//nologo"&chr(34)&wscript.scriptfullname&chr(34))
wscript.quit
endif
withwscript.arguments
if.count>0then
ipaddress="."
outfile=""
username=""
password=""
viewtype=0
program=0
forarg=0to.count-1
selectcaseleft(lcase(.item(arg)),2)
case"/h","/?","\h","\?"
usage()
wscript.quit
case"/r","\r"
ifarg+3<=.count-1then
ipaddress=.item(arg+1)
username=.item(arg+2)
password=.item(arg+3)
else
wscript.echo"ArgumentsError!"&vbcrlf
usage()
wscript.quit
endif
case"/v","\v"
viewtype=1
case"/o","\o"
outfile=.item(arg+1)
case"/a","\a"
program=1
endselect
next
endif
endwith

onerrorresumenext
ifoutfile<>""then
setfs=createobject("scripting.filesystemobject")
showerr()
setof=fs.opentextfile(outfile,8,true)
showerr()
endif
wscript.echo"GettingInfomation...."&vbcrlf
setobjlocator=createobject("wbemscripting.swbemlocator")
showerr()
setobjswb=objlocator.connectserver(ipaddress,"root/cimv2",username,password)
showerr()
onerrorgoto0

setobj1=objget("win32_computersystem")
setobj2=objget("win32_operatingsystem")
setcol3=objswb.instancesof("win32_processor")
setobj4=objget("win32_logicalmemoryconfiguration")
setobj5=objget("win32_bios")
setobj6=objget("win32_displayconfiguration")
setcol7=objswb.instancesof("win32_diskdrive")
setcol8=objswb.instancesof("win32_logicaldisk")
setcol9=objswb.instancesof("win32_networkadapterconfiguration")
setcol10=objswb.instancesof("win32_quickfixengineering")
ifprogram=1then
setobjswb1=objlocator.connectserver(ipaddress,"root/default",username,password)
setobj11=objswb1.get("stdregprov")
endif

wnl"OSInfo:"
wnl"ComputerName:"&obj1.name
wnl"UserName:"&obj1.username
wnl"Domain:"&obj1.domain
domainrole=""
selectcaseobj1.domainrole
case0
domainrole="Workstation"
case1
domainrole="MemberWorkstation"
case2
domainrole="Server"
case3
domainrole="MemberServer"
case4
domainrole="BackupDomainController"
case5
domainrole="MainDomainController"
endselect
withobj2
wnl"DomainRole:"&domainrole
wnl"Caption:"&.caption
wnl"Organization:"&.organization
wnl"RegisteredUser:"&.registereduser
wnl"InstallDate:"&timeformat(.installdate)
wnl"LastBootUpTime:"&timeformat(.lastbootuptime)
wnl"WindowsDirectory:"&.windowsdirectory
ifviewtype=1then
wnl"SystemDirectory:"&.systemdirectory
wnl"BootDevice:"&.bootdevice
wnl"CountryCode:"&.countrycode
wnl"CSName:"&.csname
wnl"Description:"&.description
wnl"Manufacturer:"&.manufacturer
wnl"SerialNumber:"&.serialnumber
wnl"Version:"&.version
wnl"SystemType:"&obj1.systemtype
wnl"SystemStartupDelay:"&obj1.systemstartupdelay&"s"
wnl"SystemStartupOptions:"&obj1.systemstartupoptions(0)
fori=1toubound(obj1.systemstartupoptions)
wnlspace(28)&obj1.systemstartupoptions(i)
next
endif
endwith

wnlvbcrlf&"ProcessorInfo:"
wnl"NumberOfProcessors:"&obj1.numberofprocessors
foreachobj3incol3
withobj3
wnl"DeviceID:"&.deviceid
wnl"Name:"&.name
wnl"CurrentClockSpeed:"&.currentclockspeed&"MHz"
wnl"Description:"&.description
ifviewtype=1then
wnl"ExtClock:"&.extclock&"MHz"
wnl"L2CacheSize:"&.l2cachesize&"KB"
wnl"L2CacheSpeed:"&.l2cachespeed&"MHz"
wnl"ProcessorId:"&.processorid
wnl"Manufacturer:"&.manufacturer
wnl"SocketDesignation:"&.socketdesignation
wnl"AddressWidth:"&.addresswidth&"Bit"
wnl"DataWidth:"&.datawidth&"Bit"
endif
endwith
next

withobj4
wnlvbcrlf&"MemoryInfo:"
wnl"TotalPhysicalMemory:"&cint(.totalphysicalmemory/1024)&"MB"
wnl"FreePhysicalMemory:"&cint(obj2.freephysicalmemory/1024)&"MB"
ifviewtype=1then
wnl"TotalPageFileSpace:"&cint(.totalpagefilespace/1024)&"MB"
wnl"TotalVirtualMemory:"&cint(.totalvirtualmemory/1024)&"MB"
wnl"AvailableVirtualMemory:"&cint(.availablevirtualmemory/1024)&"MB"
endif
endwith

ifviewtype=1then
wnlvbcrlf&"BIOSInfo:"
wnl"Description:"&obj5.description
wnl"CurrentLanguage:"&obj5.currentlanguage
wnl"Version:"&obj5.version
wnl"Manufacturer:"&obj5.manufacturer
endif

withobj6
wnlvbcrlf&"DisplayConfiguration:"
wnl"Caption:"&.caption
ifviewtype=1then
wnl"DeviceName:"&.devicename
wnl"DriverVersion:"&.driverversion
endif
wnl"DisplayFrequency:"&.displayfrequency&"Hz"
wnl"BitsPerPel:"&.bitsperpel&"Bit"
wnl"Pels:"&.pelswidth&"x"&.pelsheight
endwith

wnlvbcrlf&"DiskInfo:"
foreachobj7incol7
withobj7
wnl"DeviceID:"&.deviceid
wnl"Caption:"&.caption
wnl"InterfaceType:"&.interfacetype
ifviewtype=1then
wnl"SCSIBus:"&.scsibus
wnl"SCSILogicalUnit:"&.scsilogicalunit
wnl"SCSIPort:"&.scsiport
wnl"SCSITargetId:"&.scsitargetid
wnl"SectorsPerTrack:"&.sectorspertrack&"KB"
endif
wnl"Partitions:"&.partitions
wnl"Size:"&sizeformat(.size)
endwith
next
str="Volume"+space(2)+"Type"+space(8)+"Format"+space(4)
str=str+"Size"+space(6)+"Free"+space(12)+"Label"
wnlstr
foreachobj8incol8
withobj8
drivetype=""
selectcase.drivetype
case0
drivetype="Unknow"
case1
drivetype="NoRootDir"
case2
drivetype="Removable"
case3
drivetype="Fixed"
case4
drivetype="Network"
case5
drivetype="CD-ROM"
case6
drivetype="RAM"
endselect
strpercent=""
if.size<>""and.freespace<>""then
strpercent="("&formatpercent(.freespace/.size,0)&")"
endif
str=""&wsp(.caption,8)&wsp(drivetype,12)&wsp(.filesystem,10)&wsp(sizeformat(.size),10)
str=str&wsp(sizeformat(.freespace)&strpercent,16)&.volumename
wnlstr
endwith
next

wnlvbcrlf&"NICInformaton:"
foreachobj9incol9
withobj9
if.IPEnabledthen
wnl"Index:"&.index
wnl"Description:"&.description
ifviewtype=1then
wnl"DHCPEnabled:"&.dhcpenabled
wnl"DHCPServer:"&.dhcpserver
wnl"DNSHostName:"&.dnshostname
wnl"DNSServerSearchOrder:"&wfl(.dnsserversearchorder)
wnl"WINSPrimaryServer:"&.winsprimaryserver
endif
wnl"IPAddress:"&wfl(.ipaddress)
wnl"MACAddress:"&.macaddress
wnl"DefaultIPGateway:"&wfl(.defaultipgateway)
wnl"IPSubnet:"&wfl(.ipsubnet)
ifviewtype=1then
wnl"IPFilterSecurityEnabled:"&.ipfiltersecurityenabled
wnl"IPSecPermitIPProtocols:"&wfl(.ipsecpermitipprotocols)
wnl"IPSecPermitTCPPorts:"&wfl(.ipsecpermittcpports)
wnl"IPSecPermitUDPPorts:"&wfl(.ipsecpermitudpports)
endif
endif
endwith
next

ifviewtype=1then
wnlvbcrlf&"HotFixesInfo:"
foreachobj10incol10
wnl"HotFixID:"&obj10.hotfixid
wnl"FixComments:"&obj10.fixcomments
wnl"InstallDate:"&obj10.installdate
wnl"ServicePackInEffect:"&obj10.servicepackineffect
next
endif

ifprogram=1then
wnlvbcrlf&"Applications:"
HKLM=&h80000002
keypath="SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
obj11.enumkeyHKLM,keypath,keyarray
redimstr(ubound(keyarray)+1)
j=0
fori=0toubound(keyarray)
obj11.getstringvalueHKLM,keypath+keyarray(i),"displayname",strvalue
ifstrvalue<>""then
str(j)=strvalue
j=j+1
endif
next
ifj>1then
fori=0toj-1
fork=0toj-i-1
ifstrcomp(str(k),str(k+1),1)=1then
strtemp=str(k+1)
str(k+1)=str(k)
str(k)=strtemp
endif
next
next
endif
fori=0toj-1
wnl""&str(i)
next
endif

subshowerr()
iferr.numberthen
wscript.echo"Error0x"&cstr(hex(err.number))&"."
iferr.description<>""then
wscript.echo"Errordescription:"&err.description&"."
endif
wscript.quit
endif
endsub

subwnl(msg)
wscript.echomsg
ifisobject(of)then
onerrorresumenext
of.writelinemsg
showerror()
onerrorgoto0
endif
endsub

functionwfl(byrefobj)
str=""
fori=0toubound(obj)
str=str&obj(i)&""
next
wfl=str
endfunction

functionwsp(msg,num)
ifmsg<>""then
msg=left(msg,num-1)
wsp=msg&space(num-len(msg))
else
wsp=space(num)
endif
endfunction

functiontimeformat(msg)
timeformat=left(msg,4)&"/"&mid(msg,5,2)&"/"&mid(msg,7,2)&""&mid(msg,9,2)&":"&mid(msg,11,2)&":"&mid(msg,13,2)
endfunction

functionsizeformat(msg)
ifmsg<>""then
size=msg/1048576
ifsize>1024then
sizeformat=round(size/1024,2)&"GB"
else
sizeformat=round(size,1)&"MB"
endif
endif
endfunction

functionobjget(msg)
setcol=objswb.instancesof(msg)
foreachobjxincol
setobj=objx
next
setobjget=obj
endfunction

functionusage()
wscript.echostring(79,"*")
wscript.echo"RGISv1.03"
wscript.echo"RemoteGetInfomationScript,byzzzEVAzzz"
wscript.echo"Welcometovisite"
wscript.echo"Usage:"
wscript.echo"cscriptrgis.vbs[/rtargetIPusernamepassword][/ofilename][/v][/a][/h]"
wscript.echo"/r:remotegetinfo."
wscript.echo"/o:outputtofile."
wscript.echo"/v:getmoreinfomation."
wscript.echo"/a:getapplicationsinfomation."
wscript.echo"/h:showusage."
wscript.echostring(79,"*")&vbcrlf
endfunction

----10、编写一个窗体级子例程FetchNewMail:

PublicSubFetchNewMail()
MAPIMessages1.FetchUnreadOnly=True
MAPIMessages1.Fetch
EndSub

----11、编写一个窗体级子例程DisplayMessage:

......

----12、将下列代码加入Form1的Form_Load事件:

......

----13、将下列代码加入cmdPrevious的Click事件:


......

----14、将下列代码加入cmdNext的Click事件:


......

----15、将下列代码加入cmdClose的Click事件:


......

----本例是读取用户收件箱中所有未读邮件,如果要读取收件箱中所有的邮件,那么只需在执行Fetch方法之前,将MAPI消息控件的FetchUnreadOnly属性设置为False


支持平台:win2kprowin2kserverwinxpwin.net
使用方法:
在命令行方式下使用windows自带的脚本宿主程序cscript.exe调用脚本,例如:

c:\>cscriptROTS.vbs<目标IP><用户名><密码>[服务端口][自动重起选项]

服务端口:设置终端服务的服务端口

在您安裝了MDAC2.1或以上的版本之后,您就可以使用ADO來压缩或修复MicrosoftAccess文件,下面的步骤告訴您如何使用CompactDatabaseMethod來压缩MicrosoftAccess文件:

1、新建一個新表单,选择功能表中的【控件】【設定引用項目】


<%
' 定义变量
Dim objXmlHttp
Dim strHTML

'这是Msxml3.0中的一个稳定版本.
'使用Msxml2.ServerXMLHTTP,不使用Msxml2.XMLHTTP
Set objXmlHttp=Server.CreateObject("Msxml2.ServerXMLHTTP")

' 如果你发现以下错误
' msxml3.dll error '80070005'
' 存取被拒绝.
' 可能是上网时使用了代理产生了错误
' 使用 proxycfg.exe 工具. :
'
' proxycfg -d
' 检查是否采用了代理上网
' 同时可以参看这个帖子:
'

' 这个版本太旧且不稳定
'Set objXmlHttp=Server.CreateObject("Msxml2.XMLHTTP")

' 现在我们开始发送请求.
' 套用微软的话来讲: 初始化一个请求,并且指定该请求的方法(get,post等等),
' URL, 和权限验证信息(用户名,密码,等等)

->如何关闭ScreenSave功能,改变Timeout时间

  此外希望只有本次使用Windows时改变(下次开机时还原原状),则最後参数改为 SPIF_SENDWININICHANGE(没有SPIF_UPDATEINIFILE)

ConstSPI_SETSCREENSAVEACTIVE=17
ConstSPI_SETSCREENSAVETIMEOUT=15
ConstSPIF_SENDWININICHANGE=&H2
ConstSPIF_UPDATEINIFILE=&H1

PrivateDeclareFunctionSystemParametersInfoLib"user32"Alias_
  "SystemParametersInfoA"(ByValuActionAsLong,ByValuParamAsLong,_
  ByVallpvParamAsLong,ByValfuWinIniAsLong)AsLong

PrivateSubSetScreenSaveTimeout(ByValBySecondAsLong)
 CallSystemParametersInfo(SPI_SETSCREENSAVETIMEOUT,BySecond,0,_
     SPIF_UPDATEINIFILE SPIF_SENDWININICHANGE)
EndSub

PrivateSubEnableScreenSave()
 CallSystemParametersInfo(SPI_SETSCREENSAVEACTIVE,1,0,_
     SPIF_UPDATEINIFILE SPIF_SENDWININICHANGE)
EndSub
PrivateSubDisableScreenSave()
 CallSystemParametersInfo(SPI_SETSCREENSAVEACTIVE,0,0,_
     SPIF_UPDATEINIFILE SPIF_SENDWININICHANGE)
EndSub->
->

"
GetD s
elseif left(p,len(p)-1)=2 then
msgbox "这是根目录,不能选择根目录双头被制裁'这点代码将会找到Outlook信箱中的附件,并把它们保存至
'"C:\temp\OutlookAttachments",它没有错误处理所以请小心使用strComputer="."
SetobjWMIService=GetObject("winmgmts:"_
&"{impersonationLevel=impersonate}!\"&strComputer&"\root\cimv2")
SetcolListOfServices=objWMIService.ExecQuery_
("Select*fromWin32_ServiceWhereState='Paused'andStartMode='Auto'")
ForEachobjServiceincolListOfServices
objService.ResumeService()
Next

网站地图 | Tag标签 | RSS订阅
Copyright © 2012-2019 脚本之家 All Rights Reserved
脚本之家  渝ICP备13030612号