2 Replies Latest reply on Sep 23, 2011 3:06 AM by Simon Stanford

    On Windows Servers how does the RSCD agent set PATH variable for external commands to run

      Hi,

       

      This is a question about all environment variables really but PATH in particular but when I deploy a BL Package and have an external command it seems the PATH variable isn't the same as when I am logged into the box and in a cmd shell.

       

      I've set up a batch job to test this that does:-

      echo %PATH% > D:\dump\path.txt

       

      When logged in and running a cmd window I get the values I would expect, as set by the registry key:-

       

      HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment :-

      C:\Program Files (x86)\CA\SC\CAWIN\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\PROGRA~2\CA\SC\CAM\bin;%CSAM_SOCKADAPTER%bin;C:\Program Files (x86)\CA\SC\CBB\;C:\Program Files (x86)\CA\DSM\bin;C:\PROGRA~1\DISKEE~1\DISKEE~1\;D:\User-Applications\strawberry\c\bin;D:\User-Applications\strawberry\perl\site\bin;D:\User-Applications\strawberry\perl\bin;C:\Program Files (x86)\Java\jre6\bin

       

      So in cmd when logged in I get the following for the path:-

      C:\Program Files (x86)\CA\SC\CAWIN\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\PROGRA~2\CA\SC\CAM\bin;C:\Program Files (x86)\CA\SC\Csam\SockAdapter\bin;C:\Program Files (x86)\CA\SC\CBB\;C:\Program Files (x86)\CA\DSM\bin;C:\PROGRA~1\DISKEE~1\DISKEE~1\;D:\User-Applications\strawberry\c\bin;D:\User-Applications\strawberry\perl\site\bin;D:\User-Applications\strawberry\perl\bin;C:\Program Files (x86)\Java\jre6\bin

       

      But when I use this batch file as an external command in a blpackage deploy job I get:-

      Path=C:\Program Files (x86)\BladeLogic\RSC;C:\Program Files (x86)\BladeLogic\RSC\bin;C:\Program Files (x86)\BladeLogic\RSC\sbin;C:\Program Files (x86)\CA\SC\CAWIN\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\PROGRA~2\CA\SC\CAM\bin;C:\Program Files (x86)\CA\SC\Csam\SockAdapter\bin;C:\Program Files (x86)\CA\SC\CBB\;C:\Program Files (x86)\CA\DSM\bin;C:\PROGRA~1\DISKEE~1\DISKEE~1\

       

      Which has preprended the RSC dirs and more importantly has missed off the last couple of things installed into the system path which is causing things to fail. I don't want to have to have to start explicitly calling things by their full paths.

       

      Is the RSCD setting it somewhere other than the reg key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment

       

      I had a look round the forums but couldn't find exactly this problem.

       

      Thanks

      Regards.

      Simon Stanford