Michel,
>For me, I have to put some code in wcdemomain.prg, which is the top level program, as I want to have some functions to be available all the time and not loaded each time. This is where I open all my tables, etc. Basically, a hook can do it. Or, is there such a think available?
You probably should use the project wizard to create a new project, which will create a new main program based on your project name. I have cdwebmain.prg for one installation and tqwebmain for another. Those will not be overwritten by an upgrade as wcdemomain.prg will. After upgrading, you can compare the wcdemomain to a previously saved copy to see what might have changed that you need to add to your project main file.