/build/static/layout/Breadcrumb_cap_w.png

Problem using PATHMAN.EXE in CA

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

Answers (3)

Posted by: anonymous_9363 15 years ago
Red Belt
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.
Posted by: sylvain_langlois 15 years ago
Orange Belt
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.
Posted by: anonymous_9363 15 years ago
Red Belt
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.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ