Hi,
I have a project that must exec some custom action until finished and
must be executed in Windows Vista and previous version.
The sequence of that action are:
- copy old configuration file in a temp dir before uninstallation of older version;
- stopping and removing old service;
- install new service (after the file copies);
- copy old configuration file from the temp dir;
- start new service;
From the HowTo's I've copied the VB script to execute the copy of file
in order to save it from uninstall and now my project have:
In section InstallValidate: run VB script (immediate execution) with Backup;
In section uninstall: remove old service with no impersonation;
In section Commit: install new service with no impersonation;
In section InstallFinalize: run VB script (immediate execution) with Restore;
The problem is the start of the new service. If I put the start in the Commit section the old configuration file aren't copy. If I put the start in the InstallFinalize section it's fail on Vista because the service starts without the clause "no impersonation". If I move the VB script from InstallFinalize to Commit section the problem is that in order to use property (such as name of the Temp folder) I need run VB script with Immediate Execution and at this time the new file aren't copy (at the moment of copy new configuration file are copy over the saved version).
There are a solution to this problem?
Thanks in advance,
Helios.
FOLLOW US
Get the latest news in Application Packaging