Author Topic: Managing PC environment variables for Java  (Read 124 times)

Offline SethG

  • Newbie
  • *
  • Posts: 2
    • View Profile
Managing PC environment variables for Java
« on: May 09, 2019, 08:58:33 AM »
Hi,

Wondering if/how we might be able to automate updating the folder path for Java in the environmental variables (Win 10 in my case) via a publishing service post-install task?

Obviously I'm not ps/scripting savvy.

Thanks,

Seth

Offline Justin Chalfant

  • Patch My PC Support
  • Administrator
  • Hero Member
  • *****
  • Posts: 1810
    • View Profile
    • Patch My PC Support
Re: Managing PC environment variables for Java
« Reply #1 on: May 09, 2019, 11:46:41 AM »
Good question, we don't have anything created as an example. I'm sure there may be some example online though?

Offline SethG

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Managing PC environment variables for Java
« Reply #2 on: May 10, 2019, 08:39:47 AM »
Agreed Justin. What I'm currently using is a bat file that uses setx.exe with the /m switch and a manually edited full EV text string.

Would like to have something that doesn't require a manual edit and only modifies the "jrel.8.0_xxx\bin" section for both 32 & 64 bit flavors.

The java update breaks a critical user application until the environmental variable path has been changed.

Just putting it out there again for the collective wisdom of the forum.

Thanks for being so responsive.

Best.