VBScript Invalid Character 800A0408 compilation error

后端 未结 3 729
[愿得一人]
[愿得一人] 2021-01-03 22:21

I get a compilation error when I try to run the following vbs code from a command prompt in Windows 7.

Option Explicit
Dim objNetwork, strRemotePath1, strRem         


        
相关标签:
3条回答
  • 2021-01-03 22:50

    Check you are not using extended charater like á é í ó ú ñ in a variable's name

    0 讨论(0)
  • 2021-01-03 23:00

    A possible problem is how your file was encoded; try to save it as ANSI and run it again.

    0 讨论(0)
  • 2021-01-03 23:04

    FYI for those with the same problem in the future, to fix this:

    1. Open the .vbs in notepad
    2. Go to file and "save as"
    3. Right under the file name box, you will see a drop down menu for encoding. Choose ANSI.
    0 讨论(0)
提交回复
热议问题