locked
Checking Pre requisite before installing software RRS feed

  • Question

  • Hi,

    I am new to Windows policy settings.

    The scenario is as follows:

    I need a valid user to be able to install a software# 2, only if he has software# 1 installed on the same machine.

    How can i achieve this restriction.

    Any suggestions are appreciated.

    Thanks.

    Ankur


    AV

    Friday, December 19, 2014 2:52 PM

All replies

  • You have 2 questions and neither has to do with security development, the topic of this forum.

    1 how to I write code in my installer - ask your packaging software provider about extension points where you can plug in your own code. If you wrote the installer without any packaging software, you have the freedom to place the checking code anywhere you like, just remember to execute it before you run the software #2's installer.

    2 how to detect software #1's existence. This is something you have to ask the software #1's author. There is no agreed convention of what change an installer might bring to the machine when deploying - that is up to the author to decide. 



    Visual C++ MVP

    Friday, December 19, 2014 11:34 PM
  • You can check if software1 exists in a computer by checking registry

    RegistryKey key = Registry.ClassesRoot;
    RegistryKey software1 = key.OpenSubKey("Software1Application");
    bool software1Key = software1 == null ? false : true;

    ------------------------------------------------

    Hope above help !

    Doanh

    Sunday, December 21, 2014 3:14 PM