Make exe
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Re: Make exe
The exe only runs powershell commands to check the health of the local pc then generates a report. That doesn't work with standard user but DOES work when I run it under local admin.
However then the output in a textbox (f.e. checking cpu, checking memory etc) does not appear.
Thanks for your input.
However then the output in a textbox (f.e. checking cpu, checking memory etc) does not appear.
Thanks for your input.
Re: Make exe
Without a better example of your code there is no way to understand what you are asking or to be of much help.
Create a small project with the minimum amount of code needed to demonstrate your issue and attach it here.
Create a small project with the minimum amount of code needed to demonstrate your issue and attach it here.
Re: Make exe
There is a way to discover where the newly launched program is running but it cannot be done with native PowerShell. The Windows low level API has calls that can report on the "desktop" that the program is associated with or running on. This can be accessed by "C" code and possibly via a P/Invoke. I cannot tell off the top of my head what the API calls are.
Re: Make exe
Here is a list of API calls that can access the desktop session and report on its information. I have not tried it under PowerShell with alternate credentials. It may not work as the new process may have a separate session that is just sharing the display. Some testing would be necessary.
Re: Make exe
Here is my code, not fully deleted some stuff so the picture is clear:
https://www.dropbox.com/s/z7n3g0aasul78 ... m.zip?dl=0
I'd like to have the exe run without the need of local admin credentials or at least try to run and only if it doesn't work, run with specific credentials (it works with local admin but not when I use a domain user -with more rights-).
Please advise.
S.
https://www.dropbox.com/s/z7n3g0aasul78 ... m.zip?dl=0
I'd like to have the exe run without the need of local admin credentials or at least try to run and only if it doesn't work, run with specific credentials (it works with local admin but not when I use a domain user -with more rights-).
Please advise.
S.
Re: Make exe
Can you post your PSF or project as an attachment to this forum.
I also request that you create the smallest example of your issue. The forum is not really designed for detailed code analysis and debugging. Also, many time by simplifying your code you will discover your error on your own.
I also request that you create the smallest example of your issue. The forum is not really designed for detailed code analysis and debugging. Also, many time by simplifying your code you will discover your error on your own.
Re: Make exe
According to me the code can run on any system and it shows exactly what my problem is.
Please tell me then how I could make it more clearly?
Please tell me then how I could make it more clearly?