Timeout issue?

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
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.
This topic is 10 years and 8 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
IFG_Infra
Posts: 9
Last visit: Fri Dec 22, 2023 12:36 pm

Timeout issue?

Post by IFG_Infra »

I created a script that will copy data using fastcopy. As a .ps1 file it executes perfectly. When I convert it to a .exe it runs as expected, but once fastcopy has been running for 260 seconds my .exe just dies. Fastcopy is still running, but my .exe ends before it moves to the next step. Is this some sort of built in timeout?
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Timeout issue?

Post by davidc »

The packager doesn't have a timeout, but PowerShell may have one. This could also depend on the cmdlets you are using.

FYI: You can use a message box to hold to script (see: msgbox snippet).


David
David
SAPIEN Technologies, Inc.
User avatar
IFG_Infra
Posts: 9
Last visit: Fri Dec 22, 2023 12:36 pm

Re: Timeout issue?

Post by IFG_Infra »

My app isn't a form. I didn't get that fancy with this one as it is just a home drive migration app. I guess when running &.\fastcopy.exe... powershell doesn't wait for the process to end? In the app it waited 260 seconds consistently, and in the .ps1 it would wait about 900 seconds... then crap out. I changed it up a bit and did a $app = start-process with -passthru parameter. Then did a wait-process $app.id... that did it.
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Timeout issue?

Post by davidc »

I'm glad you were able to resolve the issue. The script doesn't have to be a form to use the MessageBox :)

David
David
SAPIEN Technologies, Inc.
This topic is 10 years and 8 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.