none
Can you force a program to expose its ActiveX controls for Automation? RRS feed

  • Question

  • I want to automate tasks on a program, however Scripting / Automation settings are turned off.  I am trying to utilize the programs COM / Active X controls

    Is there a way to force the program to allow Automation?


    • Edited by tha17 Sunday, December 1, 2019 12:03 AM
    Sunday, December 1, 2019 12:02 AM

All replies

  • Scripting and Automation are two different things.

    What do you mean by "utilize"?  Be specific.

    What program and what ActiveX controls are you referring to?

    Sunday, December 1, 2019 10:50 AM
  • Specifically, SAP

    There is a setting to just "disable scripting" that blocks you from utilizing COM and visual basic to interact with the GUI's controls.

    My question is what is the mechanism behind the setting that "disables" or blocks the ability to interact with the program's features programmatically.  Is it possible to get around this setting with DLL injection or other means if you are not able to adjust the setting that enables scripting

    Monday, December 2, 2019 6:39 AM
  • Scripting and Automation are two different things.

    What do you mean by "utilize"?  Be specific.

    What program and what ActiveX controls are you referring to?

    More specifically, I'm trying to interact with SAP's GUI controls such as clicking buttons, filling edits/reading text from edits and a multitude of other functions made possible through the program's scripting API.  The ability to do this can be enabled and disabled through a simple setting within the programs admin options both on the server and the client side.
    Monday, December 2, 2019 6:46 AM
  • I'm not familiar with SAP. 

    Generally speaking, UI Automation is used to interact with another application's user interface.

    Monday, December 2, 2019 10:04 AM
  • UI Automation is what I am referring to.  The question can be applied to really any program that is able block UI Automation.  I guess a better way to rephrase the question is: If you created a GUI program and wanted to to utilize UI Automation, but wanted to to be able to enable / disable it how would you do that
    Monday, December 2, 2019 4:06 PM
  • Hi,

    Please refer to the discussion in this thread about "Preventing UI Automation access to an application". 
    And also refer to the UIAccess flag and RequestedExecutionLevel mentioned in it.

    https://docs.microsoft.com/en-us/dotnet/framework/ui-automation/ui-automation-security-overview#manifest-files

    Best Regards,

    Drake


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, December 3, 2019 6:08 AM
    Moderator