'add_python_path.vbs
'adds path to python.exe to system %PATH%
'author: ivan yanikov, dobrokot'at'gmail.com
Set wshShell = CreateObject("WScript.Shell")
Set envVars = wshShell.Environment("System")
Dim pythonPath
pythonPath = wshShell.RegRead("HKLM\SOFTWARE\Python\PythonCore\2.5\InstallPath\")
If 0 = InStr(envVars("PATH"), pythonPath) Then
'Wscript.Echo pythonPath
envVars("PATH") = envVars("PATH") + ";" + pythonPath
End If
|
Ну и можно сделать bat-файл, который ставит питон, все библиотеки, и потом запускает скрипт выше.
MSIEXEC.EXE /I python-2.5.2.msi ALLUSERS=1 && cscript add_python_path.vbs || pause