Page 1 of 1

Form not visible when started from runas compiled script

Posted: Tue Mar 26, 2019 6:37 am
by amplexus
Hello,

I have a form that both needs runas credentials as elevation before running.
therefore I found and followed this article : https://www.sapien.com/blog/2017/01/19/ ... nistrator/
Now the issue is as follows: when I open PowerShell with runas and start the elevated exe all is normal and the form is displaying properly. (pic normal)
When I compile it in PowerShell studio the form starts but the form(layout) isn't visible. just a window with a 'print screen' of whatever is open at that moment. (pic elevated)... the 2 black stripes in the image are always present on the same place)
However it seems the controls are there (clicking the righthand top corner closes the exe).
I already with a pause in the beginning of the starter.exe and do a $form.refresh in the $form_Load without success.
All tips are welcome.
Bob

Re: Form not visible when started from runas compiled script

Posted: Tue Mar 26, 2019 7:10 am
by davidc
I believe this is a .NET bug which involves Run As and Elevation. Refer to the following post:

viewtopic.php?f=12&t=12728

Re: Form not visible when started from runas compiled script

Posted: Tue Mar 26, 2019 7:47 am
by Alexander Riedel
This forum section is reserved for customer service requests. For product issues please post in the corresponding product forum or in the trial support forum as needed.
In either case make sure you provide the requested version and OS information.
[Topic moved by moderator]

Re: Form not visible when started from runas compiled script

Posted: Wed Mar 27, 2019 6:34 am
by amplexus
Many Thanks for the feedback davidc !