flip66
New Member
- Joined
- Oct 15, 2011
- Messages
- 2
- Thread Author
- #1
I have tried numerous times in both Command Prompt and Power Shell to set the Environment Variable for "Path" and it will not stick. I have tried running as admin as well.
If I test it in the open CMD or Powershell Window it seems to stick, but if I open a new window it is gone. If I go through System Properties and add it manually that way, it works just fine. Unfortunately I need it to work through a batch file or script.
I am running Windows 7 Pro 64-bit.
CMD code I have tried:
Power Shell code I have tried:
If I test it in the open CMD or Powershell Window it seems to stick, but if I open a new window it is gone. If I go through System Properties and add it manually that way, it works just fine. Unfortunately I need it to work through a batch file or script.
I am running Windows 7 Pro 64-bit.
CMD code I have tried:
Code:
Set Path = C:\Program Files\Java\jdk1.7.0\bin;%Path%
Code:
Set Path = C:\Program Files\Java\jdk1.7.0\bin\;%Path%
Code:
Set Path = "C:\Program Files\Java\jdk1.7.0\bin";%Path%
Code:
Set Path = "C:\Program Files\Java\jdk1.7.0\bin\";%Path%
Power Shell code I have tried:
Code:
$Env:Path = $Env:Path + ";C:\Program Files\Java\jdk1.7.0\bin"
Code:
$Env:Path = $Env:Path + ";C:\Program Files\Java\jdk1.7.0\bin\"