Hi there, VB script error 1032 Invalid Character. AA enterprise client v11.3.5.0

  • 9 January 2022
  • 3 replies

I am using Run Script command to run a vb script. The script runs fine when executed directly but doesn't even execute the first line of the script when called from the Run Script Command.

The script is for SAP GUI but this is not the only instance where this error comes up. I will attach the script for the reference.


WScript.Echo "hi"

If Not IsObject(application) Then

  Set SapGuiAuto = GetObject("SAPGUI")

  Set application = SapGuiAuto.GetScriptingEngine

End If

If Not IsObject(connection) Then

  Set connection = application.Children(0)

End If

If Not IsObject(session) Then

  Set session   = connection.Children(0)

End If

If IsObject(WScript) Then

  WScript.ConnectObject session,    "on"

  WScript.ConnectObject application, "on"

End If


session.findById(wnd[1]/usr/cntlCONTAINER/shellcont/shell).focusDate = "20220110"



3 replies

Userlevel 4
Badge +7

Hi @Rishav Pandey​ ,


Could you try omitting the first line of code and see if the script works?


Kind Regards,

Ashwin A.K

Hi @Ashwin A.K​ 


I removed that line and tried it.. Result is same.

Even tried a blank script. Still the same



Userlevel 7
Badge +10

Run Script command does not show you in which line the issue is, which you'd need to identify by using the MessageBox command to debug the exact line causing this issue.


Also, check the elevation mode of AA and SAP. I've seen SAP opening with Admin: yes while the AAPlayer opens with default Admin: no.