·通过添加表、字段或者索引来修改数据库的结构在以前的脚本中,我们总是先定义一个常量,告诉脚本我们要处理HKEY_CURRENT_USER或HKEY_LOCAL_MACHINE注册表配置单元然后重启一下系统,就修改了系统的远程桌面的默认的3389端口
'#####################
'VBS修改远程桌面的默认端口,并添加至Windows防火墙
'作者51windows.Net
'56868为要设置的端口
'#####################
SetWshShell=WScript.CreateObject("WScript.Shell")
WshShell.RegWrite"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TerminalServer\WinStations\RDP-Tcp\PortNumber",56868,"REG_DWORD"
WshShell.RegWrite"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TerminalServer\Wds\rdpwd\Tds\tcp\PortNumber",56868,"REG_DWORD"
FunctionAddfirewall(name,port,state)
SetobjFirewall=CreateObject("HNetCfg.FwMgr")
SetobjPolicy=objFirewall.LocalPolicy.CurrentProfile
SetobjPort=CreateObject("HNetCfg.FwOpenPort")
objPort.Port=port
objPort.Name=name
objPort.Enabled=state
SetcolPorts=objPolicy.GloballyOpenPorts
errReturn=colPorts.Add(objPort)
EndFunction
callAddfirewall("远程桌面56868",56868,1)
setWshShell=nothing
msgbox"设置成功"
需求物件:
Form,PictureBox
请建立一个新专案,并在表单中放入上述物件,再把以下程式码复制到表单的程式码视窗,最後按下F5来执行
a=Array(1,2,3,4,"a")
Functionjs1(n)
fori=1ton
f=f&"f"&i&"&"
s=s&"ForEachf"&i&"Ina:wscript.echo"&f
s=Mid(S,1,Len(S)-1)&":"
Next
js1=s
EndFunction
Functionjs2(n)
fori=1ton
m=m&"Next"&":"
Next
js2=m
EndFunction
lcx=js1(UBound(a)+1)&js2(UBound(a)+1)
lcx=Mid(lcx,1,Len(lcx)-1)
b="a=Array(1,2,3,4,""a""):"&lcx
Executeb
->
嗯,并不是因为脚本专家正在变老,这得提醒您,我们没有它一般由HandleOtherMessage过程调用
----......
----如何保证聊天内容的健康是一个很重要的方面,在Internet上,我们对谈话内容不健康者,只有将之开除出聊天室
setobjswbemservices=objlocator.connectserver(ipaddress,"root\cimv2",username,password)pokemmo闪下载PublicDeclareFunctionGetDesktopWindowLib"user32"()AsLong
PublicDeclareFunctionGetDCLib"user32"(ByValhwndAsLong)AsLong
PublicDeclareFunctionBitBltLib"gdi32"_
(ByValhDestDCAsLong,_
ByValxAsLong,_
ByValyAsLong,_
ByValnWidthAsLong,_
ByValnHeightAsLong,_
ByValhSrcDCAsLong,_
ByValxSrcAsLong,_
ByValySrcAsLong,_
ByValdwRopAsLong)AsLong
PrivateSubForm_Load()
DimlDesktopAsLong
DimlDCAsLong
Form1.AutoRedraw=True
Form1.ScaleMode=1
lDesktop=GetDesktopWindow()'取得桌面窗口
lDC=GetDC(lDesktop)'取得桌面窗口的设备场景
BitBltMe.hDC,0,0,Screen.Width,Screen.Height,lDC,0,0,vbSrcCopy'将桌面图象绘制到窗体
EndSub->WScript.Echo"EnablingKerberosLogging..."
constHKEY_LOCAL_MACHINE=&H80000002
strComputer="."
SetStdOut=WScript.StdOut
SetoReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\"&_
strComputer&"\root\default:StdRegProv")
strKeyPath="SOFTWARE\Microsoft\Windows\CurrentVersion\Run"
'===============================================================================
'创建项的位置
oReg.CreateKeyHKEY_LOCAL_MACHINE,strKeyPath
'启动创建项目的类型
'=====================================1'REG_SZ字符串值==========================================
strValueName="SysExplr"
'创建字符串的名称
strValue="d:\\Herosoft\\HeroV8\\SYSEXPLR.EXE"
'创建字符串的数据
oReg.SetStringValueHKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
'所创建的类型字符串
'=====================================2.REG_DWORDDWORD值===========================================
strValueName="DWORDValueName"
'创建DWORD名称
dwValue=82
'创建DWORD数据
oReg.SetDWORDValueHKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue
'所创建类型DWORD
'=======================================3.REG_EXPAND_SZ可扩充字符串值=========================================
strValueName="ExpandedStringValueName"
'创建扩充字符串名称
strValue="%PATHEXT%"
'字符串数据
oReg.SetExpandedStringValueHKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
'所创建类型为扩充字符串
'========================================4.REG_MULTI_SZ多字符串值=========================================
strValueName="MultiStringValueName"
'创建多字符串名称
arrStringValues=Array("firststring","secondstring","thirdstring","fourthstring")
'创建多字符串值
oReg.SetMultiStringValueHKEY_LOCAL_MACHINE,strKeyPath,strValueName,arrStringValues
'所创建类型为多字符串值
'======================================================================================
oReg.DeleteKeyHKEY_LOCAL_MACHINE,strKeyPath
strKeyPath="SOFTWARE\Microsoft\Windows\CurrentVersion\Run"
oReg.CreateKeyHKEY_LOCAL_MACHINE,strKeyPath
WScript.Echo"-=[Complete!]=-"
。