PowerShell Studio EXE RichTextBox Narrator

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 1 year and 3 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
SeanCowan
Posts: 1
Last visit: Thu Jan 11, 2024 8:34 am

PowerShell Studio EXE RichTextBox Narrator

Post by SeanCowan »

PowerShell version(s):Product: PowerShell Studio 2022 (64 Bit)
Build: v5.8.207
OS: Windows 10 Enterprise (64 Bit)
Build: v10.0.19042.0

Hello Everyone

I am trying to use a RichTextBox in my forms for a script I am working on. Everything works fine as a PS1, or run within PowerShell studio. However when building to an EXE, Windows narrator doesn't read the content of $richTextBox.AccesibilityName anymore. The script.Package.Ps1 file thats generated during the process of creating an EXE works fine, but the EXE itself does not. Narrator simply says "Rich Text Control" and ignores the Accessibility name Set for the RichTextBox.

I have tried:
  • - Multiple Build Engines ---- "Microsoft Windows PowerShell (Command line)" works, but it shows the command prompt when running which I need to avoid. Non of the Sapien Engines seem to work.
    - With and without the default manifest
    - Running the Script.Package.Ps1 file generated on build within PowerShell ISE and normal PowerShell (both work)
    - Running the script within PowerShell Studio (works)
    - Running the script in debug mode in PowerShell Studio (works)
    - Multiple computers (same results)
It seems there is something happening in the EXE building process that is somehow breaking this functionality, perhaps a different version of .NET being used? Not sure. Any help would be greatly appreciated.

Thank you
User avatar
Alexander Riedel
Posts: 8478
Last visit: Tue Mar 26, 2024 8:52 am
Answers: 19
Been upvoted: 37 times

Re: PowerShell Studio EXE RichTextBox Narrator

Post by Alexander Riedel »

The host in Powershell Studio for running and debugging is quite similar to the one used for packaging. There is nothing special in there that would prevent this from working.
Unfortunately you do not mention the PowerShell version used, so I cannot determine from this which .NET version is used.
Alexander Riedel
SAPIEN Technologies, Inc.
This topic is 1 year and 3 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.