PDA

View Full Version : Installer/Uninstaller beans with the same name?



ckessel
05-28-2003, 10:50 AM
Is it ok to have beans with the same name in both the Install and Uninstall tabs?

I want a $W reference in my Product tab to always look for the same bean name, regardless of it's installing or uninstalling. The installer doesn't seem to complain that I'm using the same name in both the uninstall and install tabs, but I'm wondering if this is by accident or design?

Thanks,
Chris

CharlesW
05-30-2003, 08:57 AM
When you say "bean name" are you refering to the bean ID? If so, then it should not matter if you have the same beanID in both the install and uninstall wizard trees. The uninstall wizard tree should have no knowledge of the beans in the install wizard tree. The reverse also holds true.

DME170
08-31-2004, 03:59 PM
You say the installer tree and uninstaller tree have no knowledge of each other. How can I communicate information that gets saved during an install wizard action to an uninstall wizard action? For example, I have an install action in the install tree that, when completed, has a string that would be needed for a separate uninstall wizard action in the uninstall wizard tree. How can i pass this along so when the uninstaller is called, this uninstall wizard action bean has the information? Surely there must be a way?

CharlesW
08-31-2004, 04:06 PM
You could use a set product bean property wizard action to set a new product bean property. Product tree properties are retained for uninstallation. Wizard bean properties are not.

DME170
08-31-2004, 04:35 PM
Thanks for the response. Unfortunately, this information is obtained in a WizardAction during install, and needs to be available to a WizardAction bean during uninstall. IS there ANY way to stuff this information into the uninstaller? (I'd hate to have to write it out to a file...)

Thanks....

CharlesW
09-01-2004, 08:08 AM
How much information do you need to store? If it is just a few values entered by the user during installation, then collect the information with a wizard bean, and pass the information to a set product bean property wizard action. This will create a new product bean property to hold the value. During uninstallation, resolve the new property which was set using $P(propertyName). Otherwise, you will likely have to write the information to a file.

nhanthan
07-13-2007, 05:09 PM
:confused: Hi,

I have tried to set Product Bean Property in different ways during the installation either by using existing Set Product Bean Property action, or by using custom bean. In both cases I am able to access the product property in Installation stage, but not in Uninstallation.

Here is the code example from my custom bean:


String serviceName = "$W(InputServiceName.ServiceName)";
ProductService ps = (ProductService)getService(ProductService.NAME);
ps.setProductBeanProperty(ProductService.DEFAULT_PRODUCT_SOURCE, "ADSproduct", "service", serviceName);

Please let me know if I was wrong, and help me how to fix it right.

PS: I have tried existing product name in the product bean like "description", but still it does not work.

Thank you for reading.