Matthew Moses  committed bd1db47

Set some environment variables per-session.

Previously, I was setting these variables on a per-machine or per-user basis.
However, I only ever need them set when I use PowerShell, so I have migrated
them into my PowerShell profile.

  • Participants
  • Parent commits 1068c4d

Comments (0)

Files changed (1)

File Microsoft.PowerShell_profile.ps1

+Set-Item Env:\ANDROID_HOME `
+    (Get-ItemProperty 'HKLM:\SOFTWARE\Wow6432Node\Android SDK Tools' Path).Path
+Set-Item Env:\JAVA_HOME `
+    (Get-ItemProperty 'HKLM:\SOFTWARE\JavaSoft\Java Development Kit\1.7' JavaHome).JavaHome
+Set-Item Env:\PYTHON_HOME `
+    (Get-ItemProperty 'HKLM:\SOFTWARE\Python\PythonCore\3.3\InstallPath').'(default)'
+Set-Item Env:\PATH (
+    $Env:PATH,
+    (Get-ItemProperty 'HKCU:\Software\Mercurial\InstallDir').'(default)',
+    (Join-Path $Env:PYTHON_HOME Scripts),
+    (Join-Path $Env:APPDATA (Join-Path Python Scripts)),
+    (Join-Path $Env:JAVA_HOME bin),
+    (Join-Path $Env:ANDROID_HOME tools),
+    (Join-Path $Env:ANDROID_HOME platform-tools) -join ';')
 Set-Variable -Description 'Whether we have administrator privileges.' `
     -Option Constant `
     -Name 'isAdministrator' `