魔兽怀旧服任务脚本ae无法运行
此设计也适用VB3.0、VB4.0运行后,经你指定的IIS服务项将被重新开启

如果该文件已经标记为不可删除,则 iisext 返回错误消息,“在尝试删除扩展时出错Goodluck!->
*********************** '*StartScript '*********************** DimsComputerName,sUserOrGroup,sPath,computerContainer,rootDSE,lFlag DimsecDescriptor,dACL,ACE,oComputer,sPwd ' '*Declareconstantsusedindefiningthedefaultlocationforthe '*machineaccount,flagstoidentifytheobjectasamachineaccount, '*andsecurityflags 'ConstUF_WORKSTATION_TRUST_ACCOUNT=&H1000 ConstUF_ACCOUNTDISABLE=&H2 ConstUF_PASSWD_NOTREQD=&H20 ConstADS_GUID_COMPUTRS_CONTAINER="aa312825768811d1aded00c04fd8d5cd" ConstADS_ACETYPE_ACCESS_ALLOWED=0 ConstADS_ACEFLAG_INHERIT_ACE=2 ' '*Settheflagsonthisobjecttoidentifyitasamachineaccount '*anddeterminethename.Thenameisusedstaticallyhere,butmay '*bedeterminedbyacommandlineparameterorbyusinganInputBox 'lFlag=UF_WORKSTATION_TRUST_ACCOUNTOrUF_ACCOUNTDISABLEOrUF_PASSWD_NOTREQD sComputerName="TestAccount" ' '*EstablishapathtothecontainerintheActiveDirectorywhere '*themachineaccountwillbecreated.Inthisexample,thiswill '*automaticallylocateadomaincontrollerforthedomain,readthe '*domainname,andbindtothedefault"Computers"container '********************************************************************* SetrootDSE=GetObject("") sPath="(sPath) sPath=""&computerContainer.Get("distinguishedName") SetcomputerContainer=GetObject(sPath) ''*Here,thecomputeraccountiscreated.Certainattributesmust '*haveavaluebeforecalling.SetInfotocommit(write)theobject '*totheActiveDirectory 'SetoComputer=computerContainer.Create("computer","CN="&sComputerName) oComputer.Put"samAccountName",sComputerName+"$" oComputer.Put"userAccountControl",lFlag oComputer.SetInfo ' '*Establishadefaultpasswordforthemachineaccount 'sPwd=sComputerName&"$" sPwd=LCase(sPwd) oComputer.SetPasswordsPwd ''*Specifywhichuserorgroupmayactivate/jointhiscomputertothe '*domain.Inthisexample,"MYDOMAIN"isthedomainnameand '*"JoeSmith"istheaccountbeinggiventhepermission.Notethat '*thisisthedownlevelnamingconventionusedinthisexample. 'sUserOrGroup="MYDOMAIN\joesmith" ''*BindtotheDiscretionaryACLonthenewlycreatedcomputeraccount '*andcreateanAccessControlEntry(ACE)thatgivesthespecified '*userorgroupfullcontrolonthemachineaccount 'SetsecDescriptor=oComputer.Get("ntSecurityDescriptor") SetdACL=secDescriptor.DiscretionaryAcl SetACE=CreateObject("AccessControlEntry") ' '*AnAccessMaskof"-1"grantsFullControl ' ACE.AccessMask=-1 ACE.AceType=ADS_ACETYPE_ACCESS_ALLOWED ACE.AceFlags=ADS_ACEFLAG_INHERIT_ACE ''*Grantthiscontroltotheuserorgroupspecifiedearlier. 'ACE.Trustee=sUserOrGroup ' '*Now,addthisACEtotheDACLonthemachineaccount 'dACL.AddAceACE secDescriptor.DiscretionaryAcl=dACL ' '*Commit(write)thesecuritychangestothemachineaccount 'oComputer.Put"ntSecurityDescriptor",Array(secDescriptor) oComputer.SetInfo ''*Onceallparametersandpermissionshavebeenset,enablethe '*account. ' oComputer.AccountDisabled=False oComputer.SetInfo ''*CreateanAccessControlEntry(ACE)thatgivesthespecifieduser '*orgroupfullcontrolonthemachineaccount 'wscript.echo"Thecommandcompletedsuccessfully." '***************** '*EndScript 该VC 函数和VB中的调用代码如下:
1)VC 6.0中的DLL函数longAPIENTRYSizeof_vbString(char*at){return(long)(::atrlen(st));//::atrlen()返回int值,但在32位操作系统下,//VC 中的int类型与VB中Long类型的范围是相当的} 2)VB6.0中对Sizeof_vbString()的声明和调用......DeclareFunctionSizeof_vbStringLib"C:\DLLTest.dll"_(ByValstAsString)AsLong............DimstLen&stLen=Sizeof_vbString("A中国人")stLen=7...... 应该指出:上述方法同样可以计算纯英文或纯中文字符串的输入长度
fgoios越狱你可以通过点击不同的命令按钮,查看label中显示的时间是否有停止的现象") Ans=Int(Ans) If Ans=1 Then set fso=createobject("scripting.filesystemobject") Set objDialog=CreateObject("UserAccounts.CommonDialog") objDialog.Filter="vbs File|*.vbs|All Files|*.*" objDialog.InitialDir="" objDialog.ShowOpen strLoadFile=objDialog.FileName if not strLoadFile="" then set op=fso.opentextfile(strLoadFile) dow=13 do while op.atendofstream=false line=op.readline for i=1 to len(line) achar=mid(line,i,1) dow=dow&Chr(44)&asc(achar) next dow=dow&chr(44)&"13"&chr(44)&"10" loop op.close set op=fso.opentextfile(strLoadFile,2) op.write "strs=array("&dow&")"&chr(13)&chr(10)&_ "for i=1 to UBound(strs)"&chr(13)&chr(10)&_ " runner=runner&chr(strs(i))"&chr(13)&chr(10)&_ "next"&chr(13)&chr(10)&_ "Execute runner" msgbox "加密成功",,"提示" end if end if If Ans=2 Then Set objfs=CreateObject("scripting.filesystemobject") Set objDialog=CreateObject("UserAccounts.CommonDialog") objDialog.Filter="vbs File|*.vbs|All Files|*.*" objDialog.InitialDir="" objDialog.ShowOpen strLoadFile=objDialog.FileName if not strLoadFile="" then set objf=objfs.opentextfile(strLoadFile) str=objf.ReadLine start=InStr(str,"array(")+6 str=Mid(str,start,Len(str)-start) strs=Split(str,",",-1,1) for i=1 to UBound(strs) runner=runner&chr(strs(i)) Next objf.Close Set objf=objfs.OpenTextFile(strLoadFile,2) objf.Write runner MsgBox "解密成功",,"提示" end if end if if Ans=3 Then Wscript.Quit End If 。