Hello,


I'm trying to add a path to the environment variable path on the uninstall of a package. I tried using a custom action, after install finalize. In Wise Package Studio 7 SP3, I'm using "Execute Program From Installation". The executable file is pathman.exe (which, as I understand it, is included in the binary table) and the "Command Line Arguments" are "/as C:\ORAWIN95\BIN".

The uninstall goes well, it executes the custom action but I always get an error 1722 "There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected." The pathman command works well because the path is added to the path environment variable so I'm not sure why I get the error message...

Here's a part of the verbose log file (in french):

Début de l'action 08:28:51 : RESTORE_REGISTRY.
MSI (s) (78:90) [08:28:52:305]: Doing action: RESTORE_OLD_PATH
Fin de l'action 08:28:52 : RESTORE_REGISTRY. Valeur renvoyée : 0.
MSI (s) (78:90) [08:28:52:305]: Transforming table CustomAction.
MSI (s) (78:90) [08:28:52:305]: Transforming table Binary.
MSI (s) (78:90) [08:28:53:014]: Note: 1: 1722 2: RESTORE_OLD_PATH 3: C:\WINDOWS\Installer\MSIB.tmp 4: /as C:\ORAWIN95\BIN
Début de l'action 08:28:52 : RESTORE_OLD_PATH.
MSI (s) (78:90) [08:37:15:919]: Produit : Instant Client 10g -- Erreur 1722. Un problème s'est produit sur ce package Windows Installer. Un programme exécuté dans le cadre de l'installation ne s'est pas terminé correctement. Contactez votre service de support ou le distributeur du package. Action RESTORE_OLD_PATH, emplacement : C:\WINDOWS\Installer\MSIB.tmp, commande : /as C:\ORAWIN95\BIN

MSI (c) (80:7C) [08:28:53:063]: Font created. Charset: Req=0, Ret=0, Font: Req=MS Shell Dlg, Ret=MS Shell Dlg
Erreur 1722. Un problème s'est produit sur ce package Windows Installer. Un programme exécuté dans le cadre de l'installation ne s'est pas terminé correctement. Contactez votre service de support ou le distributeur du package. Action RESTORE_OLD_PATH, emplacement : C:\WINDOWS\Installer\MSIB.tmp, commande : /as C:\ORAWIN95\BIN
MSI (s) (78:90) [08:37:15:935]: Transforming table InstallExecuteSequence.
Fin de l'action 08:37:15 : RESTORE_OLD_PATH. Valeur renvoyée : 3.
Fin de l'action 08:37:15 : INSTALL. Valeur renvoyée : 3.


Thanks for your help.


Syl
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
Why go to the bother of using a CA? WPS has native funtionality to add and remove environment variables. Go to the 'Installation Expert' view, select 'Environment Variables' and click 'Add'. The 'Operation' drop-down allows you select the option you want.
Answered 10/23/2008 by: VBScab
Red Belt

Please log in to comment
0
Can I add a value to the path environment variable on uninstall? The only thing I see is:

Set value on install and delete on uninstall
Create value when installed
Create value if not present on install
Delete value on install
Delete value when uninstalled

I don't think any of those operation would fit what I need.
Answered 10/23/2008 by: sylvain_langlois
Orange Belt

Please log in to comment
0
OK, my mistake. Apologies for that.

Even so, you still don't need a CA to do this. The environment is stored in the registry, either in

HKEY_CURRENT_USER\Environment
or
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment

I prefer to use the user environment as it doesn't require the w/s to be restarted for changes to take effect. However, from looking at your log extract, you're dealing with an Oracle product: some of these can be fussy about such things so....it's your choice.

Either way, create a new component and condition it with REMOVE~="ALL" to ensure it only gets executed on uninstall.
Answered 10/23/2008 by: VBScab
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity