本文介绍了vbscript编译错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好,
我有以下代码:
Hello,
I have the following code:
Option Explicit
Const HKEY_CURRENT_USER = &H80000001 'HKEY_CURRENT_USER
Dim oReg
Dim strComputer,strValueName,arrValueNames
Dim strKeyPath1
Dim SyncMode5NameExists
ssig="Unable to open registry key"
strComputer = "."
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv")
strKeyPath1 = "Software\Microsoft\Windows\CurrentVersion\Internet Settings"
oReg.EnumValues HKEY_CURRENT_USER,strKeyPath1,arrValueNames
For Each strValueName In arrValueNames
SyncMode5NameExists = (StrComp(strValueName,"SyncMode5"))
If SyncMode5NameExists != 0 Then
Wscript.Echo "bla,bla"
End If
'Exit For
Next
但是,我收到以下错误,不知道是什么。
C:\ scripts.\\test.vbs(20,26)Microsoft VBScript编译错误:预期'')
感谢您的帮助,
But, I get the following error, no idea what it is.
C:\scripts\test.vbs(20, 26) Microsoft VBScript compilation error: Expected '')
Thanks for your help,
推荐答案
If SyncMode5NameExists != 0 Then
应该是
should be
If SyncMode5NameExists <> 0 Then
这是VB不等号。
That is the VB not equal sign.
这篇关于vbscript编译错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!