View previous topic :: View next topic |
Author |
Message |
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Wed Jun 19, 2013 1:43 am Post subject: |
|
|
I can think of no reason why Process.Start would not work when called inside an encrypted application. Our own applications use Process.Start extensively - and as you note it works when called from elsewhere in your application. It may be that the Process is starting - but when called from the Load event the handle is not created yet or some other timing issue and so your external update app isn't running as you expect. Can I suggest that you change Process.Start to start some other process - just to confirm whether it is working. For instance change it to start an instance of Notepad.exe. _________________ Infralution Support |
|
Back to top |
|
|
Javier
Joined: 09 Oct 2009 Posts: 215
|
Posted: Wed Jun 19, 2013 1:58 am Post subject: |
|
|
Yes, it opens Notedpad. I also tried eliminating the parameter /qb and it runs as well. What this parameter does is "the updater will ask for permission before performing an update, but will not show a message box if no update is available". Without this parameter it always asks permission to check for updates, even when there's no update available, which may be very annoying. |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Wed Jun 19, 2013 2:06 am Post subject: |
|
|
It doesn't sound like this is an issue with the fact that your app is encrypted then - but an issue with the updater. _________________ Infralution Support |
|
Back to top |
|
|
Javier
Joined: 09 Oct 2009 Posts: 215
|
Posted: Wed Jun 19, 2013 2:29 am Post subject: |
|
|
Yes, it could be. However it worked fine before this modification. I will check with the updater provider to see if I can find out something. |
|
Back to top |
|
|
Javier
Joined: 09 Oct 2009 Posts: 215
|
Posted: Wed Jun 19, 2013 12:20 pm Post subject: |
|
|
Sorry to continue with this, but I hope that you can put me in the right direction to solve the issue.
This is the response from the updater provider:
Quote: | As long as your application responds to a WM_CLOSE message sent to its
main window, you're fine. Just make sure that your main window does just
that.
|
Is my application that has to close, or is the bootstrap? How can I verify the statement above? Thank you. |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Thu Jun 20, 2013 12:08 am Post subject: |
|
|
Quote: | Is my application that has to close, or is the bootstrap? |
Once your application window closes the main thread returns to the bootstrap that then exits. Have you verified that the window handle you are passing to the process looks valid (ie not 0x00000)?
Have you put the code in a common method that is called by both the Load event and the menu click handler (so that you can be sure the code is exactly the same)?
If the same code is being called and works from the menu but not the Load event then it must be a timing issue. I would consider putting starting a timer (say 2 seconds) when your form loads and then calling the start process code on the timer event - that way you know that the window has fully loaded. _________________ Infralution Support |
|
Back to top |
|
|
Javier
Joined: 09 Oct 2009 Posts: 215
|
Posted: Thu Jun 20, 2013 1:00 am Post subject: |
|
|
Yes, the handle is valid. Apparently the issue occurs only with the parameter /qb. Since I need to move on, I decided to get rid of it. It's not exactly what I had before, but it's acceptable. Thank you for your help. Great support. |
|
Back to top |
|
|
|