Skip to Content
avatar image
Former Member

How I can run SAP script from Citrix?

Hi everyone.

In the past I was running SAP scripts without problem, with my user open

Starting the script in this way:

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

Now , the IT team changed to Citrix only and my scripts not running more.

Someone can help me to obtain the correct script to run from Citrix?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Nov 03, 2017 at 08:51 AM

    Hello Guillermo,

    SAP GUI Scripting works in Citrix environment without any problems. Are you sure that SAP GUI Scripting is installed and enabled? Take a look at your SAP Logon > Options > Accessibility & Scripting > Scripting.

    Best regards

    Add comment
    10|10000 characters needed characters exceeded

    • Hello Guillermo,

      I copied the first 17 lines of your script into my Citrix environment as VBS file, changed the TAC to SE16 and execute it without any errors. I assume your Citrix environment is 64-bit, open a console and type this:

      If it is AMD64 it is 64-bit.

      What version of SAP GUI do you use? Older versions doesn't support 64-bit COM calls. So you can't execute your script from Explorer directly. Open a console and type this to use 32-bit Windows Scripting Host:

      Let us know if it is work.


      001.jpg (14.0 kB)
      002.jpg (15.1 kB)