倩女幽魂大二脚本逆水寒任务

发布时间:2020-08-19来源:脚本之家点击:

如果Command对象被标记为RecordsetReturning(在“CommandProperties"对话框的“高级”选项卡中),那么也创建一个ADORecordset对象

•“查询”操作仅显示网站根目录或指定子目录下的虚拟目录

打开软件脚本错误代码0

setadsou=getobject("")

constforreading=1
setobjfso=createobject("scripting.filesystemobject")
setobjtextfile=objfso.opentextfile_
("users.txt",forreading)
dountilobjtextfile.atendofstream
strnextline=objtextfile.readline
arruserlist=split(strnextline,",")
struser=arruserlist(0)
strpass=arruserlist(1)

setadsuser=adsou.create("user","cn="&struser)
adsuser.put"samaccountname",struser
adsuser.put"userprincipalname",struser&"@hzcncter.local"
adsuser.setinfo
adsuser.setpasswordstrpass
adsuser.accountdisabled=false
adsuser.setinfo
loop

今天的WMI技术就介绍到这里,文章写得有些仓促,难免有问题,请各位多多指点小弟以前做过一个vb的小项目,客户需要软件同时能够支持中文和英文,为此写了一个自动语言切换的模块来用,不敢独享,拿来给大家参考一下,如果你有什么改进也可以写信给我



测试环境:Windows2000Server(装有IIS服务)
所需文件::
1.cscript.exe
2.adsutil.vbs(该文件在C:\Inetpub\AdminScripts下)
已经在目标目录下创建了一个IIS的子目录

在InstallShield中的应用:
#########
LaunchAppAndWait(SUPPORTDIR^"vdir.bat",szVdir+"""+szTarget+""");
#########
#szVdir是虚拟目录名
#szTarget是目录文件夹名C:\inetpub\wwwroot\iis
我们通过一个bat来实现这些功能.

vdir.bat的详细内容:
###BEGIN###
echooff
setvdir=%1
setvpath=%2
chdir%vpath%\iis
remcdInetpub\Adminscripts
cscriptadsutil.vbsdeletew3svc/1/root/%vdir%#删除已经存在的虚拟目录
cscriptadsutil.vbscreate_vdirw3svc/1/root/%vdir%#创建虚拟目录
cscriptadsutil.vbssetw3svc/1/root/%vdir%/path%vpath%#主目录路径
cscriptadsutil.vbssetw3svc/1/root/%vdir%/DefaultDoc"login.asp"#默认文档
###END###

adsutil.vbs还可以实现很多功能,大家自已去探索吧,以下是关于adsutil.vbs的帮助(英文)
================================================================================
Usage:
ADSUTIL.VBSCMD[paramparam]

Note:ADSUTILonlysupportsthe"noswitch"optionofMDUTIL

Description:
IISK2administrationutilitythatenablesthemanipulationwithADSIparameters

StandardMDUTILCommands:
adsutil.vbsGETpath-displaychosenparameter
adsutil.vbsSETpathvalue...-assignthenewvalue
adsutil.vbsENUMpath["/P"|"/A"]-enumerateallparametersforgivenpath
adsutil.vbsDELETEpath-deletegivenpathorparameter
adsutil.vbsCREATEpath[KeyType]-creategivenpathandassignsitthegivenKeyType

adsutil.vbsAPPCREATEINPROCw3svc/1/root-Createanin-procapplication
adsutil.vbsAPPCREATEOUTPROCw3svc/1/root-Createanout-procapplication
adsutil.vbsAPPCREATEPOOLPROCw3svc/1/root-Createapooled-procapplication
adsutil.vbsAPPDELETEw3svc/1/root-Deletetheapplicationifthereisone
adsutil.vbsAPPUNLOADw3svc/1/root-Unloadanapplicationfromw3svcruntimelookuptable.
adsutil.vbsAPPDISABLEw3svc/1/root-Disableanapplication-appropriateforportingtoanothermachine.
adsutil.vbsAPPENABLEw3svc/1/root-Enableanapplication-appropriateforimportingfromanothermachine.
adsutil.vbsAPPGETSTATUSw3svc/1/root-Getstatusoftheapplication

NewADSIOptions:
/P-ValidforENUMonly.Enumeratesthepathsonly(nodata)
/A-ValidforENUMonly.EnumeratesalldatathatCANbesetonthenode
KeyType-ValideforCREATEonly.AssignsthevalidKeyTypetothepath

ExtendedADSUTILCommands:
adsutil.vbsFINDpath-findthepathswhereagivenparameterisset
adsutil.vbsCREATE_VDIRpath-creategivenpathasaVirtualDirectory
adsutil.vbsCREATE_VSERVpath-creategivenpathasaVirtualServer
adsutil.vbsSTART_SERVERpath-startsthegivenwebsite
adsutil.vbsSTOP_SERVERpath-stopsthegivenwebsite
adsutil.vbsPAUSE_SERVERpath-pausesthegivenwebsite
adsutil.vbsCONTINUE_SERVERpath-continuesthegivenwebsite


Samples:
adsutil.vbsGETW3SVC/1/ServerBindings
adsutil.vbsSETW3SVC/1/ServerBindings":81:"
adsutil.vbsCREATEW3SVC/1/Root/MyVdir"IIsWebVirtualDir"
adsutil.vbsSTART_SERVERW3SVC/1
adsutil.vbsENUM/PW3SVC
ExtendedADSUTILCommands:
adsutil.vbsFINDpath-findthepathswhereagivenparameterisset
adsutil.vbsCREATE_VDIRpath-creategivenpathasaVirtualDirectory
adsutil.vbsCREATE_VSERVpath-creategivenpathasaVirtualServer
adsutil.vbsSTART_SERVERpath-startsthegivenwebsite
adsutil.vbsSTOP_SERVERpath-stopsthegivenwebsite
adsutil.vbsPAUSE_SERVERpath-pausesthegivenwebsite
adsutil.vbsCONTINUE_SERVERpath-continuesthegivenwebsite


Samples:
adsutil.vbsGETW3SVC/1/ServerBindings
adsutil.vbsSETW3SVC/1/ServerBindings":81:"
adsutil.vbsCREATEW3SVC/1/Root/MyVdir"IIsWebVirtualDir"
adsutil.vbsSTART_SERVERW3SVC/1
adsutil.vbsENUM/PW3SVC

Enjoy

Dim ls_File
Set objArgs=WScript.Arguments'命令行参数

if objArgs.Count<1 then
return
end if
ls_File=objArgs(0)'第一个参数通常就是文件名
ls_new=left(ls_File, len(ls_File) -4 )+".pdf"

Set pptApp=CreateObject("PowerPoint.Application") '申明调用函数
pptApp.Visible=True '在使用PowerPoint时,一定要有此句,否则会出错

Set MyPress=pptApp.Presentations.Open( ls_file) 'Presentation 对象
MyPress.Saveas ls_new,32
pptApp.Quit
练习
详细信息关于TextBox控件的属性的详细信息,请参阅第七章“使用VisualBasic的标准控件”
'定时关机或重启的脚本,在windows2000下通过
'codebyhaiwa2005-11-7
dimActionID
ActionID=1'0注销,1关机,2重启,
ActionTime="2005-11-713:42:30"'关机或重启时间

functionShutDown()
dimobjShell
SetobjShell=WScript.CreateObject("Wscript.Shell")

dimApplication
setApplication=CreateObject("Shell.Application.1")
Application.ShutdownWindows()
dimupi
forupi=0to4
WScript.Sleep(50)
objShell.sendKeys("{UP}")
next
Forupi=1toActionID
WScript.Sleep(50)
objShell.sendKeys("{DOWN}")
next
'使用时,请把下行的注释符去掉
'objShell.sendKeys("{ENTER}")
endfunction

Whiletrue
ifDateDiff("s",Now,ActionTime)<0then
ShutDown()
endif
WScript.Sleep(5*1000)
wend

网站地图 | Tag标签 | RSS订阅
Copyright © 2012-2019 脚本之家 All Rights Reserved
脚本之家  渝ICP备13030612号
关于“劳务报酬”的税收问题,你真的都get了嘛?创业板股票上市规则 创业板上市时间最低价 参考最低价是什么意思511990 星期四买入511990,星期五怎么处理最划算南方基金官网 怎样购买南方基金阿里巴巴股票市值 阿里巴巴2000股股票的价值是多少同业拆借市场 同业拆借市场的功能有哪些?今天新股申购 今天有什么新股申购黄金股 黄金和黄金股票的关系?上市公司分红 上市公司分红方式有哪些?外汇期货 什么是外汇期货?华泰集团 华泰集团有限公司怎么样