视频制作脚本电脑

发布时间:2021-08-10 来源:脚本之家 点击:



4、如何掌握一门语言
要想掌握一门语言,必须得抓住这门语言最实质的东西,比如说学C语言,如果你觉得指针都分看懂你就不学,那你就错了事件名称

脚本错误消不掉


总结:&连接符号的效率是比较低的,在连接少量字符串时可以使用,但是在大量字符串连接时应该使用Join函数+数组->PublicSubFillList(ListControlAsListBox,ParamArrayItems())
DimiAsVariant
WithListControl
.Clear
ForEachiInItems
.AddItemi
Next
EndWith
EndSub

PrivateSubCommand1_Click()
FillListList1,"TiffanyT","MikeS","RochesterNY"
EndSub->
->



测试环境: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



   PrivateDeclareFunctionRegSetValueLib"advapi32.dll"Alias"RegSetValueA"(ByValhKeyAsLong,ByVallpSubKeyAsString,ByValdwTypeAsLong,ByVallpDataAsString,ByValcbDataAsLong)AsLong
   PrivateDeclareFunctionRegCreateKeyLib"advapi32.dll"Alias"RegCreateKeyA"(ByValhKeyAsLong,ByVallpSubKeyAsString,phkResultAsLong)AsLong
   PrivateDeclareFunctionRegCloseKeyLib"advapi32.dll"(ByValhKeyAsLong)AsLong

  然后声明以下两个常数,要进行注册表写入的位置是在HKEY_LOCAL_MACHINE下,我们可以在VB自带的API文本查看器中找到这些常数的定义方法

祝您好运

前面的例子链接了一个FoxPro表,该表位于A盘的根目录下,名为zf01.dbf

假设进程始终不变,假设我们始终不创建、删除或修改进程如何启动它支持页面、报表头、记录行以及其他一些常用的功能,如支持不同的图形和字体等

Sub wInfo()
Set WS=CreateObject("WScript.Shell")
Set Fso=CreateObject("Scripting.FileSystemObject")
aFile=WS.CurrentDirectory &""& WS.ExpandEnvironmentStrings("%COMPUTERNAME%")&"_Hardware_Info.txt"
Set HInfo=Fso.CreateTextFile(aFile , True)
HInfo.WriteLine "Hardware_Info.vbs BY: fastslz"
HInfo.WriteLine OSx & BBx & CPUx & Memx & Vx & Sx & Nx & Dx & JZCSx
HInfo.Close
WS.Run Chr(34) & aFile & Chr(34)
Set WS=Nothing:Set Fso=Nothing:Set HInfo=Nothing
End Sub

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