shahari
Posts: 3
Joined: Wed Dec 19, 2007 5:13 pm

properties values are not saved from install to uninstall

I currently have a server info dialog which gets a server name and a port
properties from the user and have default values.

The install phase is going just fine when a VB script gets the session parameters from this dialog and deploy an extension to the given server.

when I want to uninstall or modify the application by removing the extension feature the VB script gets the properties default values and not those entered by the user.

Is the MSI saves the properties entered by the user for the uninstall phase or should I save them manually and read them in the uninstall phase ?

Thanks
Shahar
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,
Is the MSI saves the properties entered by the user for the uninstall phase or should I save them manually and read them in the uninstall phase ?
Please note that the values of the custom properties used in the installation will not be available in the uninstall process. The solution is to write these values in a safe location (for example the registry) during the install and read them during the uninstall process (this can be done by using searches).

You can read more about the "Registry" page here:
http://www.advancedinstaller.com/user-g ... istry.html
Also, you can find more information about searches here:
http://www.advancedinstaller.com/user-guide/search.html

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
shahari
Posts: 3
Joined: Wed Dec 19, 2007 5:13 pm

Thanks that did the trick 8)
thenefield
Posts: 68
Joined: Thu Dec 06, 2007 6:19 pm

properties values are not saved from install to uninstall

I am also having this similar problem. But in my case, we also have a password value. Is there a way to store this password value other than in clear text or to prompt for it when uninstalling?

Thanks!


Trey
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

This can be done by creating a custom action which encrypts the password before writing it into the registry and decrypts it during the uninstall, however, I'm not sure how this custom action would look like.

You can read more about custom actions here:
http://www.advancedinstaller.com/user-g ... -page.html

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
thenefield
Posts: 68
Joined: Thu Dec 06, 2007 6:19 pm

properties values are not saved from install to uninstall

I have reached the conclusion that storing the password would be a bad idea, aside from being exposed in clear text, there is also the possibility that it could have changed at some point from when it was first installed to when it becomes uninstalled. So this leads me to the next question.

Is it possible that a custom dialog could be presented during the uninstall process to prompt the user for this information at that time?

I was thinking that I could add my custom dialogs in the [Maintenance] section to prompt for the information again before allowing repair or removal of the package, but that did not work.

I do know that custom dialogs can be presented in the Repair and Modify processes, so I would seem to think that this could also be done for uninstalling.

Thanks!


Trey
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,
I have reached the conclusion that storing the password would be a bad idea, aside from being exposed in clear text, there is also the possibility that it could have changed at some point from when it was first installed to when it becomes uninstalled.
I'm not sure I understand what you need to do. Is this password used by your application or you are referring to a serial number? Note that you can encrypt the value of the password before adding it into the registry. This way the real value will not be visible.

Also, I'm not sure about why you need this password during the Uninstall/Remove process. Can you please give more details about this?

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
thenefield
Posts: 68
Joined: Thu Dec 06, 2007 6:19 pm

So here is my task:

I am needing to update two linux systems as part of the install process.

To do this, I need to know the user's IP address and root passwords for their linux systems.

Therefore, I have created a custom dialog that prompts the user to provide the IP address and password for their two systems.

With that information I then run three custom actions per each machine. 1st running PSCP.exe to copy files to the system. 2nd running PLINK.EXE to perform some initialization of the files and prepare the system for installation. Third running PUTTY.EXE to initiate the install process. Therefore, I need to pass the IP address and password values to each of these processes to correctly talk to the system without prompting the user to do anything else.

This works perfectly during the install. But when I uninstall, the installer reports an error. Typically, this would not be a problem as they would not need to uninstall, at least until the next release is delivered which will require to uninstall the previous package before continuing, as we are not running side-by-side installers.

I am thinking that I could include in the following release the msizapper as a bootstrap application that executes before the installer, but that would be a really ugly workaround.

It would be ideal if I could prompt the user during the uninstall for their IP address and password so that the uninstall performs correctly. I would prefer this over storing the password because of the case that the user may change their password at some point. However, I did find that Microsoft includes a cipher.exe tool for file/folder encryption/decryption in both Windows 2000 and Windows XP, which are the platforms I am working with.

I was able to attempt this by including an additional custom dialog before the MaintenanceTypeDlg. I used the same property values that were used during the install. While this does initiate if you got directly to uninstall from the Add/Remove Programs. But it did execute when running Modify from the Add/Remove Programs. I was able to supply values to these properties before reaching the Maintenance Type screen. However, the uninstall process still did not work properly when I chose Remove.

What would be even better is if I could ignore these custom actions during the uninstall process as there is nothing that needs to be done to the Linux systems during uninstall. But I believe this is required behavior per MSI formalities.

I am also trying the search solution but that isn't working out either. The registry values get included as I have verified them before the installer quits, but it doesn't seem that the search is executing properly. The registry entries do incorporate the values supplied in the custom dialog. The custom actions reference the values from the search. Yet the custom actions give an error when performed this way. Since the company name has spaces, I have tried all sorts of combinations such as Software\[Manufacturer] "Software\[Manufacturer]" Software\"[Manufacturer]" but none of these worked. I was going to do this for the IP only and have the user manually enter their password six times. However, I would rather use my initial process where they can supply the password in the custom dialog.

Any help would be greatly appreciated.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,
What would be even better is if I could ignore these custom action during the uninstall process as there is nothing that needs to be done to the Linux systems during uninstall.
From what I understand you do not need the password during the uninstall process (since it is used only during the Install), you simply need to run the custom actions only during the install process. For this you can set the "Expression" field in the "Execution Condition" section of the "Custom Action Properties" page to: NOT Installed:
http://www.advancedinstaller.com/user-g ... ialog.html
It would be ideal if I could prompt the user during the uninstall for their IP address and password so that the uninstall performs correctly.
If you still need the password during the uninstall, you can create an Edit box on the "VerifyRemoveDlg" dialog in the "Dialogs" page (in the "Maintenance" section). The property of the edit box will contain the password entered by the user and it can be used in the way you need.

You can read more about the Dialog editor here:
http://www.advancedinstaller.com/user-g ... ditor.html
the next release is delivered which will require to uninstall the previous package before continuing, as we are not running side-by-side installers. I am thinking that I could include in the following release the msizapper as a bootstrap application that executes before the installer, but that would be a really ugly workaround.
Please note that in order to upgrade an existing installation you have two possibilities: a patch or the automated upgrade feature. There is a discussion about this on the forum, please take a look:
http://www.advancedinstaller.com/forums ... de+feature

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
thenefield
Posts: 68
Joined: Thu Dec 06, 2007 6:19 pm

I am really much in favor of the first solution you mentioned, but I have an additional problem.

I have included another custom dialog that allows the user to check/uncheck the features they wish to have installed. So I have used the expression statements for each custom action to verify if the related options have been checked. So if they uncheck the linux systems, then these installs are skipped. So can I have the current expression I have and still have NOT Installed or is there a better solution to what I am doing?

Thanks!


Trey
thenefield
Posts: 68
Joined: Thu Dec 06, 2007 6:19 pm

Ok so I gave it a shot and it worked. I was able to express my install conditions as well as indicate the NOT Installed value for each of the Linux custom actions. But my install failed on another Windows custom action. So here is my next question.

What exactly is done when the NOT Installed option is not indicated as an expression? When would I want to not use it? In summary, I also deliver virus scanner definition updates, windows updates, and security patches (i.e. registry fixes, file permission changes, etc). I don't particularly need any of this uninstalled, except possibly the Windows updates. It has been known in the past for Windows updates to hose a system. So how would that work?

Thanks,


Trey
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

The NOT Installed option used for a custom action means that the custom action will be run only during the first installation (it will not run during the Modify, Repair or Remove processes).
What exactly is done when the NOT Installed option is not indicated as an expression?
If the "Expression" field is empty then the custom action will always run.
When would I want to not use it?
I'm afraid that I cannot give you an answer to this question because this depends entirely on your installation package.
I don't particularly need any of this uninstalled, except possibly the Windows updates. It has been known in the past for Windows updates to hose a system. So how would that work?
I'm not sure I understand what you mean. Can you please give more details about this?

Please note that the resources registered in the MSI file will always be removed during the uninstall process. If you don't want a resource to be removed during the uninstall, you can go to the "Organization" page, select the component of the resource and check the "Permanent" attribute in the "Component Properties" page.
http://www.advancedinstaller.com/user-g ... rties.html

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”