none
Need help setting a registry key as a script variable RRS feed

  • Question

  • Hi everyone,  need some help here.

    Here is the scenerio,  I have Java Developers kit installed on our workstations.  The path needs to be modified to reflect it. 

    What I am trying to do is this 

    Export the following to a Script variable(%SCRIPTVARIABLE%:

    "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{64A3A4F4-B792-11D6-A78A-00B0D0180730}

    "InstallLocation"="C:\Program Files\Java\jdk1.8.0_73\"

    Then take that info and do this

    Setx %path%;%SCRIPTVARIABLE%bin

    Ideas on how to do this?

    Thursday, February 25, 2016 3:58 PM

All replies

  • Hi everyone,  need some help here.

    Here is the scenerio,  I have Java Developers kit installed on our workstations.  The path needs to be modified to reflect it. 

    What I am trying to do is this 

    Export the following to a Script variable(%SCRIPTVARIABLE%:

    "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{64A3A4F4-B792-11D6-A78A-00B0D0180730}

    "InstallLocation"="C:\Program Files\Java\jdk1.8.0_73\"

    Then take that info and do this

    Setx %path%;%SCRIPTVARIABLE%bin

    Ideas on how to do this?

       
    For /f "tokens=3*" %A in ('reg query HKEY_CURRENT_USER\Environment /v temp') do echo %A


    David Candy

    Saturday, February 27, 2016 1:15 AM
  • Hi David :)

    Why don't you drop by at Windows 10 forum?


    Ramesh Srinivasan  |  The Winhelponline Blog

    Sunday, February 28, 2016 4:44 AM