PDA

View Full Version : renaming vpd.properties file



yanivi
07-15-2004, 10:56 AM
Hi,

I created 2 custom beans, which move the vpd file from the original location $HOME/vpd.properties to the installation target location [$P(absoluteInstallLocation)] and back to the original location.

The scenario is:
First installation:
Install -> move vpd file to target location.
Patch installation:
move vpd to original location -> Install -> move vpd file to target location.

The problem is in the patch installation, while the wizard lunched, i get the following error -
Errors occurred during the installation.
Unable to install Enabler [abp600.0.1.8]: Patch is associated with a product that is not installed on target machine.

This is because the installer look for the vpd in the original location before being able to copy the file.

I located the wizard custom bean to be the first wizard action, before Installed Product Check wizard action.

Please help, is it possible to do this solution ??

Thanks
Yaniv

CharlesW
07-16-2004, 01:10 PM
After moving the vpd, try calling RegistryService.initializeRegistry(). This should load the vpd into memory again.

yanivi
07-18-2004, 02:41 AM
Hi,

Thanks for your replay, but the problem is that the InstallShield is running a vpd validation before the first wizard action is lunched ("Installed Product Check").

I tried to initialize the vpd, but it happens too late, i get an error.


Please advice.

Thanks
Yaniv

CharlesW
07-19-2004, 08:41 AM
Yes, but calling initializeRegistry will load the VPD into memory again even though it has been loaded previously. This information is not used however, until the first install check panel, so reloading the VPD should not cause any problems.

Note: You can not control the location of the vpd.properties file which is loaded. The file name returned by RegistryService.getVPDFileName() will be used, so you need to ensure that your copy of the VPD is copied into this location before calling InitializeRegistry.

yanivi
07-20-2004, 02:30 AM
Hi,

I already did this reload operation in my wizard custom bean.

The problem is that the installer do not get to it.

The first massage i get when the installer is lunched is this error:Errors occurred during the installation. Unable to install <my product name>: Patch is associated with a product that is not installed on target machine.

I think that the installer is looking for the vpd file in his original location and because the file is not in his original location the installer cannot find the installed product name.

Note - we cant leave the vpd file in the original location when the installation finishes.

Thanks
Yaniv

CharlesW
07-20-2004, 07:30 AM
The file vpd.properties must be copied to the location returned by RegistryService.getVPDFileName(). Usually, this will be in the users home directory. Any other location, and the installer will not be able to find the file. After copying vpd.properties to the location, you will call initializeRegistry. This must be done before the installed product check dialog

Sometime after the install action completes, you can then copy the vpd.properties file to a new location. You must know what this new location will be, as you will have to copy it back to the location returned by getVPDFileName for any subsequent patches/updates.