set wshshell=wscript.createobject("wscript.shell")
wshshell.regwrite "HKCU\1\value",&H01,"REG_BINARY"
test=wshshell.regread( "HKCU\1\value")
如果我想看test的值。请问该怎样输出test的值?
msgbox test和wscript.echo test都会提示“类型不匹配”
VBS如何输出REG_BINARY值
答案:1 悬赏:0 手机版
解决时间 2021-01-04 04:55
- 提问者网友:轻浮
- 2021-01-03 19:52
最佳答案
- 五星知识达人网友:掌灯师
- 2021-01-03 19:58
msgbox simplebinarytostring(test)
Function SimpleBinaryToString(binary)
'SimpleBinaryToString converts binary data (VT_UI1 | VT_ARRAY Or MultiByte string)
'to a string (BSTR) using MultiByte VBS functions
Dim I, S
For I = 1 To LenB(Binary)
S = S & Chr(AscB(MidB(Binary, I, 1)))
Next
SimpleBinaryToString = S
End Function
Function SimpleBinaryToString(binary)
'SimpleBinaryToString converts binary data (VT_UI1 | VT_ARRAY Or MultiByte string)
'to a string (BSTR) using MultiByte VBS functions
Dim I, S
For I = 1 To LenB(Binary)
S = S & Chr(AscB(MidB(Binary, I, 1)))
Next
SimpleBinaryToString = S
End Function
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯