Good Afternoon -
I've always been interested in Powershell Studio and recently reinstalled the trial. I'm trying to create an application/script that does a couple of basic actions, but having issues getting it to work. If possible, could you point me to an example / sample project that is similar so that I may see if the result is what I want? If none exist, any assistance or links would be appreciated.
Project Goal
Upon running, it will execute an existing PS1 script with the -noexit parameter then minimize to a custom icon in the system tray. Right clicking on the tray icon will provide an "Exit" option which when selected will stop the script which was initially started with the -noexit parameter and close out of the app therefore removing the tray icon.
Anything you could do to assist would be appreciated -
Thank You
Example of Project I'm Attempting?
Forum rules
DO NOT POST SUBSCRIPTION NUMBERS, LICENSE 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.
DO NOT POST SUBSCRIPTION NUMBERS, LICENSE 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.
Re: Example of Project I'm Attempting?
We have a packager engine / host that is a system tray application:
https://www.sapien.com/blog/2017/07/10/ ... owershell/
Please let us know if this is indeed what you are looking for.
Alternatively, you could use PowerShell Studio's designer to add a NotifyIcon control that displays in the system tray:
https://info.sapien.com/index.php/guis/ ... on-control
https://www.sapien.com/blog/2017/07/10/ ... owershell/
Please let us know if this is indeed what you are looking for.
Alternatively, you could use PowerShell Studio's designer to add a NotifyIcon control that displays in the system tray:
https://info.sapien.com/index.php/guis/ ... on-control
David
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Re: Example of Project I'm Attempting?
Thank you -
I actually found out about that after posting, but having an issue. I built the script and executed the EXE, but it immediately closes. I'm sure it's because most of the scripts I wish to compile use "IO.FileSystemWatcher" therefore when launching from command line using powershell.exe, I must include the -noexit parameter or I get the same behavior. I looked through build options, but didn't see anything like "-noexit", unfortunately.
Short of perhaps calling an existing script from the EXE which defeats the whole point, how would I go about configuring the build so that once executed, it wouldn't exit until one right clicks on the icon and chooses to do so?
If I could figure that out, I think this app will suite my needs. Thanks
I actually found out about that after posting, but having an issue. I built the script and executed the EXE, but it immediately closes. I'm sure it's because most of the scripts I wish to compile use "IO.FileSystemWatcher" therefore when launching from command line using powershell.exe, I must include the -noexit parameter or I get the same behavior. I looked through build options, but didn't see anything like "-noexit", unfortunately.
Short of perhaps calling an existing script from the EXE which defeats the whole point, how would I go about configuring the build so that once executed, it wouldn't exit until one right clicks on the icon and chooses to do so?
If I could figure that out, I think this app will suite my needs. Thanks
- Alexander Riedel
- Posts: 8488
- Last visit: Tue Apr 16, 2024 8:42 am
- Been upvoted: 37 times
Re: Example of Project I'm Attempting?
I would suggest these articles.
https://www.sapien.com/blog/2017/07/10/ ... owershell/
https://www.sapien.com/blog/2019/01/10/ ... lications/
You will note the they make clear that your script needs to not exit until you decide to close the app.
I suggest to study the associated sample project.
https://www.sapien.com/blog/2017/07/10/ ... owershell/
https://www.sapien.com/blog/2019/01/10/ ... lications/
You will note the they make clear that your script needs to not exit until you decide to close the app.
I suggest to study the associated sample project.
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.