Form not visible when started from runas compiled script
Posted: Tue Mar 26, 2019 6:37 am
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
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