To help you better we need some information from you.
*** Please fill in the fields below. If you leave fields empty or specify 'latest' rather than the actual version your answer will be delayed as we will be forced to ask you for this information. ***
Product, version and build:
32 or 64 bit version of product: 64bit PowerShell Studio 2018 v5.5.152
Operating system: Win10 x64
32 or 64 bit OS: 64
*** Please add details and screenshots as needed below. ***
We have built several EXE tools from PSS, as of late the EXEs will only properly execute on the system they were written on. The executable files run, they just don't perform any actions.
Compiled EXE Will Only Execute on Author Computer
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.
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.
- ArtiFlexSW
- Posts: 12
- Last visit: Wed Jan 27, 2021 5:12 pm
- Alexander Riedel
- Posts: 8488
- Last visit: Tue Apr 16, 2024 8:42 am
- Been upvoted: 37 times
Re: Compiled EXE Will Only Execute on Author Computer
We are going to need a little more information on that one. "As of late", does that mean out of the blue, after a service update for Windows, after a PowerShell Studio update and re-packaging or something else?
Are the 'other' systems the same OS and patch level?
How where your applications packaged? For what bit-level, PowerShell version etc.
What type of applications are these? Command line, Forms, service?
If you say they 'run' but don't do anything, how exactly do you determine they run?
Do the actual scripts run on the systems in question?
Last but not least, any entries in the system or application logs that might provide an error message?
Are the 'other' systems the same OS and patch level?
How where your applications packaged? For what bit-level, PowerShell version etc.
What type of applications are these? Command line, Forms, service?
If you say they 'run' but don't do anything, how exactly do you determine they run?
Do the actual scripts run on the systems in question?
Last but not least, any entries in the system or application logs that might provide an error message?
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
- ArtiFlexSW
- Posts: 12
- Last visit: Wed Jan 27, 2021 5:12 pm
Re: Compiled EXE Will Only Execute on Author Computer
"As of late", does that mean out of the blue, after a service update for Windows, after a PowerShell Studio update and re-packaging or something else? There have been several windows updates along with PSS updates since the last time I compiled an EXE from PSS.
Are the 'other' systems the same OS and patch level? No. They are on Windows 7. The compiler system is Windows 10.
How where your applications packaged? For what bit-level, PowerShell version etc. 64 bit, Powershell V5
What type of applications are these? Command line, Forms, service? Windows Forms
If you say they 'run' but don't do anything, how exactly do you determine they run? The form launches and you can click buttons, but they do not perform any actions
Do the actual scripts run on the systems in question? If I export the projects as a PS1, the forms run fine on all systems we have tested
Last but not least, any entries in the system or application logs that might provide an error message? Nada
Are the 'other' systems the same OS and patch level? No. They are on Windows 7. The compiler system is Windows 10.
How where your applications packaged? For what bit-level, PowerShell version etc. 64 bit, Powershell V5
What type of applications are these? Command line, Forms, service? Windows Forms
If you say they 'run' but don't do anything, how exactly do you determine they run? The form launches and you can click buttons, but they do not perform any actions
Do the actual scripts run on the systems in question? If I export the projects as a PS1, the forms run fine on all systems we have tested
Last but not least, any entries in the system or application logs that might provide an error message? Nada
- mxtrinidad
- Posts: 399
- Last visit: Tue May 16, 2023 6:52 am
Re: Compiled EXE Will Only Execute on Author Computer
If you're creating the executable. Can you please share your packager settings? (print screen)
At least on the following:
Script Engine
Output Setting
Execution Restrictions
Just in case! Are you using the Installer to create the MSI?
At least on the following:
Script Engine
Output Setting
Execution Restrictions
Just in case! Are you using the Installer to create the MSI?
- mxtrinidad
- Posts: 399
- Last visit: Tue May 16, 2023 6:52 am
Re: Compiled EXE Will Only Execute on Author Computer
Sorry! I forgot to ask.
Is this happening with all executable you are creating?
Is this happening with all executable you are creating?
Re: Compiled EXE Will Only Execute on Author Computer
I suspect there are script error occurring, because the GUI is displayed with you run the executable. In addition, you don’t see any error messages because the Windows Forms engines suppresses all output. For debugging purposes, try packing the script using a Console Engine, that way you can see the output.
Note: In the Windows Forms engine, use the $ConsoleOutput variable to access the contents of the output.
Alternatively, you can wrap you cmdlet calls in try catch block and display any exceptions using your GUI.
Note: In the Windows Forms engine, use the $ConsoleOutput variable to access the contents of the output.
Alternatively, you can wrap you cmdlet calls in try catch block and display any exceptions using your GUI.
David
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
- ArtiFlexSW
- Posts: 12
- Last visit: Wed Jan 27, 2021 5:12 pm
Re: Compiled EXE Will Only Execute on Author Computer
The project runs fine if it is exported as a powershell file, just not as an EXE.
I am building as an EXE, not using an MSI
Screenshots attached
I am building as an EXE, not using an MSI
Screenshots attached
- Attachments
-
- PowerShell Studio_2018-06-05_17-08-16.png (29.68 KiB) Viewed 2593 times
-
- PowerShell Studio_2018-06-05_17-08-04.png (23.19 KiB) Viewed 2593 times
-
- PowerShell Studio_2018-06-05_17-07-46.png (47.67 KiB) Viewed 2593 times
- mxtrinidad
- Posts: 399
- Last visit: Tue May 16, 2023 6:52 am
Re: Compiled EXE Will Only Execute on Author Computer
The question still remains... Is it happening with any executable you create? If not, as one of my colleague mention, it's possible there's an error that's not showing while the form runs.
Try adding the Try{...} Catch{..} block to trap any errors and use the $ConsoleOutput as suggested previously.
I'm able to create executable without any issues.
Please let us know what you find.
Try adding the Try{...} Catch{..} block to trap any errors and use the $ConsoleOutput as suggested previously.
I'm able to create executable without any issues.
Please let us know what you find.