Sign in to follow this  
Followers 0
JackFlashJI

Check for and uninstall existing application

4 posts in this topic

Can someone please provide direction for the following:

I would like to check if an application has been installed on a workstation.

If the application exists on the workstation, then I would like to uninstall it.

Application name is 'XYZ app'.

If the application does not exist, then I will simply move on to the next part of my code....

The application may or may not be running, so it is my understanding that I cannot somply check to see if the process exists.....

Thanks in advance

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

"Check if application installed" is pretty broad. The 2 thoughts I have would be do check for the existence of a directory structure (or at minimum search for the executable, but this is time consuming and not always reliable) or check the registry uninstall section for the application. The latter would be the optimum choice, but there may not be an entry depending on the application. There is also a difference between the methods of uninstalling the application depending on the type of install(MSI, Wise, etc.). You could also try to automate running the Add/Remove program applet, but that may be tough depending on the OS version(XP, Vista, Windows 7, etc.)

Edited by Varian

Share this post


Link to post
Share on other sites

Several things to think about:

  • You can look in the registry to see what is installed. This article will give you some direction on how the registry is involved in this: http://support.microsoft.com/kb/314481
  • Look for specific exe or other file types files in specific folders.
  • Look in startup - This is also listed in the registry.
  • Look at what is in the login script.

Share this post


Link to post
Share on other sites

Thank you for your replies....

All the systems involved are Windows Server 2003 SP2 booxes.

* There are 4 applications that I am working with and they are all setup a little different, so using registry works for some but not all.

* Two of them install to the same folder, so using the folder is not optimal because even if the folder is there, that does not mean both are installed.

All appear in the "Add/Remove" and I would like to automate that process is possible. This is where I was looking for guidance.

Thanks.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0