elevated administrator powershell: started software = black window

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 3 years and 9 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.
User avatar
soscvkoflert
Posts: 3
Last visit: Mon Nov 20, 2023 2:08 am

elevated administrator powershell: started software = black window

Post by soscvkoflert »

Hi,

we exectued software installation via a complied powershell based on:

https://www.sapien.com/blog/2017/01/19/ ... nistrator/

The executed command msiexec runs fine with adminsitrative permissions. But if there is a pop-up, then the pop-up itself is visible, but the content is black. Its indepdent of the used graphics card on all machines the same issue.
2020-05-25 16_01_35-Window.png
2020-05-25 16_01_35-Window.png (50.36 KiB) Viewed 1756 times
Build for Sapien Powershell V5 Host (Windows), tried also command line, same result

Windows 10, 1709, 64-Bit
Powershell Studio Version 2020 5.7.178
User avatar
Olga_B
Site Admin
Posts: 196
Last visit: Thu Mar 28, 2024 8:34 am

Re: elevated administrator powershell: started software = black window

Post by Olga_B »

We are investigating this and will update you as soon as we have more information. And thank you for the feedback.
User avatar
Alexander Riedel
Posts: 8479
Last visit: Thu Mar 28, 2024 9:29 am
Answers: 19
Been upvoted: 37 times

Re: elevated administrator powershell: started software = black window

Post by Alexander Riedel »

It is an effect of a .NET Framework bug. To make a long story short, the starter app loads the .NET framework. The launches itself as another user. Then it launches msiexec in your case elevated.
The .net framework attempts to share itself across the three processes but collides with the different security tokens.
The only way around we found is if the starting executable (the one doing run as) is NOT a .net executable.
Try specifying the Microsoft Windows PowerShell (Command Line) for that part and see if that helps in your case.
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
soscvkoflert
Posts: 3
Last visit: Mon Nov 20, 2023 2:08 am

Re: elevated administrator powershell: started software = black window

Post by soscvkoflert »

Thanks for the explanation, when we switch to Windows Powershell we get on the starter script (trying to start the elevated script):

Cannot run Script, error: The stub received bad data.

B
User avatar
Alexander Riedel
Posts: 8479
Last visit: Thu Mar 28, 2024 9:29 am
Answers: 19
Been upvoted: 37 times

Re: elevated administrator powershell: started software = black window

Post by Alexander Riedel »

Can you send your starter script and the .psbuild file (zipped) to support@sapien.com?
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
soscvkoflert
Posts: 3
Last visit: Mon Nov 20, 2023 2:08 am

Re: elevated administrator powershell: started software = black window

Post by soscvkoflert »

Done, thanks a lot.
This topic is 3 years and 9 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.