Novell Home

Force Uninstall Application Object on Next Launch

Novell Cool Solutions: Tip
By Bryan Keadle

Digg This - Slashdot This

Posted: 8 Dec 2005
 

We made available for distribution an application object for users. This application would self install once first selected (of course).

Then, management had a change of heart, and decided that this application should *NOT* be made available, and should be removed from any computers that may have already had it installed.

Dilemma

It's easy enough to disassociate the application object from the group object making it not available anymore, but how do I uninstall it from machines that already had it installed? Yes, there's an UNINSTALL option under Common / Uninstall:

"Uninstall application if not used within x days"

But the minimum value here is 5, so as long as people used the application from day to day, it would still be available to them. It would be nice to either have a check box on this screen to "Force uinstall on next use" or be able to set this Days field to 0 ("Uninstall application if not used within 0 days") which would effectively be on next use. (Enhancement request for the ZENworks people)

I wanted to avoid having to create a new Uninstall application object to do the uninstall, and I also didn't want to delete this object, just in case we decide to "turn it on in the future".

So the question is, "How can I force an uninstall of the application on next use for users that already have installed the application, while still hiding it from those members of the associated group who haven't launched the application yet but still keep the current object so I *could* easily just turn it back on in the future?"

Solution

- First, to make the application unavailable to those that haven't installed the application yet, I added a File Existence Requirement under the Availability / System Requirements tab that will only show the object if the the target executable exists:

- Next, I replace the executable properties under the Run Options / Application tab to run NALWIN32.EXE program, with these parameters:

/L="%AppObject%" /U

You could replace the %AppObject% with the distinguished name of the application object, but I like using a variable instead (because I have an automated process that will create this variable as part of the application object creation process)

(You might want to copy/paste any of these values you're removing here into the Identification / Administrator Notes field in the event you want to re-enable the application later)

- Lastly, if you use a variable like I did, you'll want to create the AppObject variable in the Common / Macros tab:

Now, when the users that had already installed this application go to launch it, it will automatically uninstall.

I (you) could set it to Force Run so it doesn't require the user to launch the program (only to discover then that instead of running it, it get's uninstalled).


Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com

© 2014 Novell