Re: Windows execute but don't wait.

new topic     » goto parent     » topic index » view thread      » older message » newer message
ChrisB said...

Hi

How I do this.

When an eu program runs, it puts its whole self in memory (does it not?), and does not require the program to acyually be on the disk.

My program checks at regular points for the size of itself. When it first loads up, it records the size of itself in a global variable.

If the size of the program changes is a new version has been uploaded, then a flag is raised and the user is informed that the program needs to be restarted.

It would be a small leap to run an external script to kill all instances of itself, and then restart the updated program (a suicide-phoenix)

Chris

I managed to execute the shellExecuteEx OK, but it was the loading and passing of the structure which foxed me. However, Chris, you have a good point; if the startup program is a simple bit of code, it can look to see if there is a setup program present and run that, or, if not, run the main program. I somehow just thought it would be easy to run the setup without wait and then quit. But while most things are easier in Windows compared to DOS, some are dead easy in DOS. Maybe just that I did lots of DOS coding when I was young and adventurous!

So unless there is a simple way for my program to start the setup and then quit, I will do the Chris route with a minimal startup program. Which actually has its merits too. Hmmm. I need to look into this. Then the startup script can update the main program but the main program can update the startup code. Definitely has something going for it.

I'm blaming my inability to think on the heat in the UK; we just aren't used to it.

Thanks again for your help, gentlemen.

Andy

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu