none
GPO add specially-formatted entries to beginning of system PATH?

    Question

  • We need to PREPEND (not append) entries to system path.  The entries must be added to the beginning of the path, not added to the end for the functionality required.

    We also need to added some variables to the path, such as %JAVA_HOME% and %ORACLE_HOME% as opposed to hard coded paths such as C:\Oracle or C:\Programs (x86)\Java etc..

    I tried setting this with GPP, but it is not working.

    I was able to add %JAVA_HOME% and %ORACLE_HOME% as system variables, but I was not then able to use those variables in the path.  When I added then in the GPP, they were ignored. 

    Using these variables will allow changing the path of the variable without having to manually change the system path each time.

    Users are able to do this using the Systems properties GUI, but I don't see any way to enter the same text into the system path via GPO or even a batch file.  When I try a batch file to set the path, it converts JAVA_HOME and ORACLE_HOME text to a hard coded path and we don't want that.

    Is there another way to deploy these required system settings?




    • Edited by MyGposts Thursday, November 12, 2015 12:55 AM
    Thursday, November 12, 2015 12:36 AM

Answers

All replies

  • > a batch file.  When I try a batch file to set the path, it converts
    > JAVA_HOME and ORACLE_HOME text to a hard coded path and we don't want that.
     
    You have to escape the % signs ( ^% afaik, but might be wrong)...
     
    Thursday, November 12, 2015 9:19 AM
  • I just tried "set path=^%JAVA_HOME^%\bin;%path%" and that isn't working either.
    Thursday, November 12, 2015 4:30 PM
  • A long shot, in Novell Zenworks it used to be %%variable%% (GPP resembles Zenw. a lot). You could try that.

    Rolf Lidvall, Swedish Radio (Ltd)

    Friday, November 13, 2015 8:05 AM
  • > I just tried "set path=^%JAVA_HOME^%\bin;%path%" and that isn't working
    > either.
     
    Then I'd go the registry way and edit HKLM\System\CCS\Control\Session
    Manager\Environment:Path directly.
     
    Friday, November 13, 2015 11:13 AM