Search code examples
javadeploymentinstallationcygwin

Check whether cygwin is installed & install if needed


I am trying to run shell scripts in Windows XP using Java. I found that we can run shell scripts using cygwin in Windows, but what if it is not installed on the system?

I want to check whether it is installed on machine, if it is not installed - add that software as a part of my application and install it.


Solution

  • If cygwin complains with windows installer standards then when you install it you should be able to find a registry entry for this program.

    You should check the registry for something like localmachine/software/cygwin.... this validation can be done using RegistryKey class in c#.

    To include this program as a dependency you must provide the way you are installing your app, visual studio windows installer? Inno installer?