3 Replies Latest reply on Mar 19, 2013 4:06 PM by Bill Robinson

    A BSA or nsh variable to represent all possible Windows drives

    William L. Thomas, Jr.

      In the environment I am working in, Windows applications can and have been installed on any drive. For example, the Java runtime could be installed under /D/Program Files/Oracle/jre or /D/Program Files/Oracle/jre or /[whatever]/Program Files/Oracle/jre, etc.; and this can be for any application. There are several component templates and nsh scripts that I created that need to know where a particular application is installed. What I have been doing, especially with component templates, is simply duplicating my compliance rules to look for the application on every possible drive it could be on. For example, I will create one compliance rule of /C/Program Files/Oracle/jre exists another of /D/Program Files/Oracle/jre exists and so forth.


      My question is, is there a variable or method I can use so I will only need to include one compliance rule for ever possible drive?


      For example, I would include the rule ??drive_variable??/Program Files/Oracle/jre and the compliance job would automatically search ll the possible drives on the server?


      Note that the location of the application executables is independent of the location of the Windows installation. Therefore, using ??SYSTEMROOT?? does not work.


      Also note that, to my chagrin, oftentimes the when an application is installed on a different drive, the registry configuration for the application is often different. Therefore, I cannot consistently use the application's configuration in the Windows Registry to create a single compliance rule.


      Is there such a variable or method I can use and/or is there a better way for me to do what I want to accomplish?