Skip to content

Instantly share code, notes, and snippets.

@DavidHamburg
Created May 16, 2017 16:11
Show Gist options
  • Save DavidHamburg/a615873e209ff9823829ffa643fa87f4 to your computer and use it in GitHub Desktop.
Save DavidHamburg/a615873e209ff9823829ffa643fa87f4 to your computer and use it in GitHub Desktop.
install-python.ps1
mkdir C:\\install;
Invoke-WebRequest https://www.python.org/ftp/python/3.6.1/python-3.6.1.exe -OutFile C:/install/python-3.6.1.exe;
Start-Process C:\install\python-3.6.1.exe -ArgumentList '/quiet InstallAllUsers=1 TargetDir=C:\\python' -Wait;
Invoke-WebRequest https://netcologne.dl.sourceforge.net/project/pywin32/pywin32/Build%20221/pywin32-221.win32-py3.6.exe -OutFile C:/install/pywin32-221.win32-py3.6.exe;
Start-Process c:\python\Scripts\easy_install-3.6.exe -ArgumentList 'C:\install\pywin32-221.win32-py3.6.exe' -Wait;
$path = $env:path + ';C:\python';
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\' -Name Path -Value $path;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment