cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
SKDBLR
Level 2

Aborting uninstallation in Unix for non root user

I using IA 2008 for creating Unix installer/uninstaller. I want only root user to uninstall software and if any non root user attempts to uninstall, proper error should be displayed and uninstall process should be aborted immediately.

I have written Unix Uninstaller which checks for logged in user and if it is root then installation proceeds. If it is non root then using uninstall method, I am throwing FatalInstallException. Proper error is displayed on screen/logged into log but uninstallation still continues.

This is kind of corrupting some files and next time when root user tries to uninstall, its causing problem. I checked docs and it says throwing FatalInstallException does not stop uninstallation. There is no abortInstallation method for UninstallerProxy.

If there is some workaround where i can abort uninstallation for non root user in Unix?

Any help or idea will be highly appreciated.

Thanks
SK
Labels (1)
0 Kudos
(3) Replies
pv7721
Level 20

I check for the user ID that has launched the installer in the pre-install task. If the ID is non-zero, meaning that the user is non root, I display a message that has the OK button which is set to end the installer. You can do the exact same thing in console mode.
0 Kudos
SKDBLR
Level 2

Thanks Vlad for the quick response.

I am facing the issue in uninstall where I have to run the uninstaller in silent mode. Let me know in case you have any suggestion for this.

Thanks
SK
0 Kudos
pv7721
Level 20

Sorry, I haven't seen your post. I think that basically you must do the same thing, but just in the pre-uninstall task. And I think you've got an API function in order to abort uninstallation.
0 Kudos