dim arr(3)
arr(0)="a"
arr(1)="b"
arr(2)="c"
arr(3)="岁则拆d"盯虚
for each i in arr
msgbox""乎枣&i&""
next
一个例子,请参考。把下面代码保存为vbs文野穗手件,运颂嫌行即族盯可。
const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set StdOut = WScript.StdOut
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_
strComputer &"\root\default:StdRegProv")
strKeyPath = "SYSTEM\CurrentControlSet\Services"
oReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys
For Each subkey In arrSubKeys
msgbox subkey
Next
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)