Skip to content

Instantly share code, notes, and snippets.

@aodj
Last active August 29, 2015 14:05
Show Gist options
  • Save aodj/270192af31c9a3f17711 to your computer and use it in GitHub Desktop.
Save aodj/270192af31c9a3f17711 to your computer and use it in GitHub Desktop.
step #3
:: http://www.robvanderwoude.com/ntregistry.php
echo Checking registry for existing Python install path under "HKCU\Software\Python\PythonCore\2.7\InstallPath"
:: query the registry, parse it's output and if we get anything, save it as %installpath%
:: delims is a TAB followed by a space
for /f "tokens=2* delims= " %%A in ('reg query "HKCU\Software\Python\PythonCore\2.7\InstallPath"') do set installpath=%%B
:: if we've got a value in %installpath%, save it out to disk for restoration later
if not "%installpath%"=="" call reg export "HKCU\Software\Python\PythonCore\2.7\InstallPath" installpath.reg && echo Found existing InstallPath, saving to installpath.reg
:: update the registry with the path to our virtualenv
echo Updating "HKCU\Software\Python\PythonCore\2.7\InstallPath" from "%installpath%" to "%cd%\%1"
call reg add "HKCU\Software\Python\PythonCore\2.7\InstallPath" /d %cd%\%1 /f
:: now run the wxpython installer
echo Installing wxPython3.0-win32-3.0.0.0-py27
call wxPython3.0-win32-3.0.0.0-py27.exe /VERYSILENT /SUPPRESSMSGBOXES /LOG=wxpythoninstall.log /DIR=%1\Lib\site-packages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment