Guest User

Untitled

a guest
Dec 14th, 2018
250
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 28.93 KB | None | 0 0
  1. Microsoft Windows [Version 10.0.14393]
  2. (c) Корпорация Майкрософт (Microsoft Corporation), 2016. Все права защищены.
  3.  
  4. C:\Windows\system32>@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
  5. Getting latest version of the Chocolatey package for download.
  6. Getting Chocolatey from https://chocolatey.org/api/v2/package/chocolatey/0.10.11.
  7. Downloading 7-Zip commandline tool prior to extraction.
  8. Extracting C:\Users\98AF~1\AppData\Local\Temp\chocolatey\chocInstall\chocolatey.zip to C:\Users\98AF~1\AppData\Local\Temp\chocolatey\chocInstall...
  9. Installing chocolatey on this machine
  10. Creating ChocolateyInstall as an environment variable (targeting 'Machine')
  11. Setting ChocolateyInstall to 'C:\ProgramData\chocolatey'
  12. WARNING: It's very likely you will need to close and reopen your shell
  13. before you can use choco.
  14. Restricting write permissions to Administrators
  15. We are setting up the Chocolatey package repository.
  16. The packages themselves go to 'C:\ProgramData\chocolatey\lib'
  17. (i.e. C:\ProgramData\chocolatey\lib\yourPackageName).
  18. A shim file for the command line goes to 'C:\ProgramData\chocolatey\bin'
  19. and points to an executable in 'C:\ProgramData\chocolatey\lib\yourPackageName'.
  20.  
  21. Creating Chocolatey folders if they do not already exist.
  22.  
  23. WARNING: You can safely ignore errors related to missing log files when
  24. upgrading from a version of Chocolatey less than 0.9.9.
  25. 'Batch file could not be found' is also safe to ignore.
  26. 'The system cannot find the file specified' - also safe.
  27. chocolatey.nupkg file not installed in lib.
  28. Attempting to locate it from bootstrapper.
  29. PATH environment variable does not have C:\ProgramData\chocolatey\bin in it. Adding...
  30. ПРЕДУПРЕЖДЕНИЕ: Not setting tab completion: Profile file does not exist at
  31. 'C:\Users\Наталья\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1'.
  32. Chocolatey (choco.exe) is now ready.
  33. You can call choco from anywhere, command line or powershell by typing choco.
  34. Run choco /? for a list of functions.
  35. You may need to shut down and restart powershell and/or consoles
  36. first prior to using choco.
  37. Ensuring chocolatey commands are on the path
  38. Ensuring chocolatey.nupkg is in the lib folder
  39.  
  40. C:\Windows\system32>
  41. C:\Windows\system32>choco install python
  42. Chocolatey v0.10.11
  43. Installing the following packages:
  44. python
  45. By installing you accept licenses for the packages.
  46. Progress: Downloading python3 3.7.1... 100%
  47. Progress: Downloading chocolatey-core.extension 1.3.3... 100%
  48. Progress: Downloading python 3.7.1... 100%
  49.  
  50. chocolatey-core.extension v1.3.3 [Approved]
  51. chocolatey-core.extension package files install completed. Performing other installation steps.
  52. Installed/updated chocolatey-core extensions.
  53. The install of chocolatey-core.extension was successful.
  54. Software installed to 'C:\ProgramData\chocolatey\extensions\chocolatey-core'
  55.  
  56. python3 v3.7.1 [Approved]
  57. python3 package files install completed. Performing other installation steps.
  58. The package python3 wants to run 'chocolateyInstall.ps1'.
  59. Note: If you don't run this script, the installation will fail.
  60. Note: To confirm automatically next time, use '-y' or consider:
  61. choco feature enable -n allowGlobalConfirmation
  62. Do you want to run the script?([Y]es/[N]o/[P]rint): y
  63.  
  64. Installing 64-bit python3...
  65. WARNING: Generic MSI Error. This is a local environment error, not an issue with a package or the MSI itself - it could mean a pending reboot is necessary prior to install or something else (like the same version is already installed). Please see MSI log if available. If not, try again adding '--install-arguments="'/l*v c:\python3_msi_install.log'"'. Then search the MSI Log for "Return Value 3" and look above that for the error.
  66. ERROR: Running ["C:\ProgramData\chocolatey\lib\python3\tools\python-3.7.1-amd64.exe" /quiet InstallAllUsers=1 PrependPath=1 TargetDir="C:\Python37" ] was not successful. Exit code was '1603'. Exit code indicates the following: Generic MSI Error. This is a local environment error, not an issue with a package or the MSI itself - it could mean a pending reboot is necessary prior to install or something else (like the same version is already installed). Please see MSI log if available. If not, try again adding '--install-arguments="'/l*v c:\python3_msi_install.log'"'. Then search the MSI Log for "Return Value 3" and look above that for the error..
  67. The install of python3 was NOT successful.
  68. Error while running 'C:\ProgramData\chocolatey\lib\python3\tools\chocolateyInstall.ps1'.
  69. See log for details.
  70.  
  71. python v3.7.1 [Approved]
  72. python package files install completed. Performing other installation steps.
  73. The install of python was successful.
  74. Software install location not explicitly set, could be in package or
  75. default install location if installer.
  76.  
  77. Chocolatey installed 2/3 packages. 1 packages failed.
  78. See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
  79.  
  80. Failures
  81. - python3 (exited 1603) - Error while running 'C:\ProgramData\chocolatey\lib\python3\tools\chocolateyInstall.ps1'.
  82. See log for details.
  83.  
  84. Did you know the proceeds of Pro (and some proceeds from other
  85. licensed editions) go into bettering the community infrastructure?
  86. Your support ensures an active community, keeps Chocolatey tip top,
  87. plus it nets you some awesome features!
  88. https://chocolatey.org/compare
  89.  
  90. C:\Windows\system32>python -m pip install -U pip
  91. "python" не является внутренней или внешней
  92. командой, исполняемой программой или пакетным файлом.
  93.  
  94. C:\Windows\system32>python --version
  95. "python" не является внутренней или внешней
  96. командой, исполняемой программой или пакетным файлом.
  97.  
  98. C:\Windows\system32>python
  99. "python" не является внутренней или внешней
  100. командой, исполняемой программой или пакетным файлом.
  101.  
  102. C:\Windows\system32>python -V
  103. "python" не является внутренней или внешней
  104. командой, исполняемой программой или пакетным файлом.
  105.  
  106. C:\Windows\system32> import sys
  107. "import" не является внутренней или внешней
  108. командой, исполняемой программой или пакетным файлом.
  109.  
  110. C:\Windows\system32> !{sys.executable} --version
  111. "!{sys.executable}" не является внутренней или внешней
  112. командой, исполняемой программой или пакетным файлом.
  113.  
  114. C:\Windows\system32>!{sys.executable} --version
  115. "!{sys.executable}" не является внутренней или внешней
  116. командой, исполняемой программой или пакетным файлом.
  117.  
  118. C:\Windows\system32>choco install python
  119. Chocolatey v0.10.11
  120. Installing the following packages:
  121. python
  122. By installing you accept licenses for the packages.
  123. python v3.7.1 already installed.
  124. Use --force to reinstall, specify a version to install, or try upgrade.
  125.  
  126. Chocolatey installed 0/1 packages.
  127. See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
  128.  
  129. Warnings:
  130. - python - python v3.7.1 already installed.
  131. Use --force to reinstall, specify a version to install, or try upgrade.
  132.  
  133. C:\Windows\system32>choco install python
  134. Chocolatey v0.10.11
  135. Installing the following packages:
  136. python
  137. By installing you accept licenses for the packages.
  138. python v3.7.1 already installed.
  139. Use --force to reinstall, specify a version to install, or try upgrade.
  140.  
  141. Chocolatey installed 0/1 packages.
  142. See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
  143.  
  144. Warnings:
  145. - python - python v3.7.1 already installed.
  146. Use --force to reinstall, specify a version to install, or try upgrade.
  147.  
  148. C:\Windows\system32>choco reinstall python v3.6
  149. Chocolatey v0.10.11
  150. Could not find a command registered that meets 'reinstall'.
  151. Try choco -? for command reference/help.
  152.  
  153. C:\Windows\system32>choco --force install python
  154. Chocolatey v0.10.11
  155.  
  156. C:\Windows\system32>@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
  157.  
  158. C:\Windows\system32>powershell
  159. Windows PowerShell
  160. (C) Корпорация Майкрософт (Microsoft Corporation), 2016. Все права защищены.
  161.  
  162. PS C:\Windows\system32> version
  163. version : Имя "version" не распознано как имя командлета, функции, файла сценария или выполняемой программы. Проверьте
  164. правильность написания имени, а также наличие и правильность пути, после чего повторите попытку.
  165. строка:1 знак:1
  166. + version
  167. + ~~~~~~~
  168. + CategoryInfo : ObjectNotFound: (version:String) [], CommandNotFoundException
  169. + FullyQualifiedErrorId : CommandNotFoundException
  170.  
  171. PS C:\Windows\system32> -version
  172. -version : Имя "-version" не распознано как имя командлета, функции, файла сценария или выполняемой программы. Проверьт
  173. е правильность написания имени, а также наличие и правильность пути, после чего повторите попытку.
  174. строка:1 знак:1
  175. + -version
  176. + ~~~~~~~~
  177. + CategoryInfo : ObjectNotFound: (-version:String) [], CommandNotFoundException
  178. + FullyQualifiedErrorId : CommandNotFoundException
  179.  
  180. PS C:\Windows\system32> help
  181.  
  182. РАЗДЕЛ
  183. Справочная система Windows PowerShell
  184.  
  185. КРАТКОЕ ОПИСАНИЕ
  186. Отображение справочных сведений о командлетах и основных понятиях Windows PowerShell.
  187.  
  188. ПОДРОБНОЕ ОПИСАНИЕ
  189. В справке Windows PowerShell описываются командлеты,
  190. функции, сценарии и модули Windows PowerShell, а также объясняются основные понятия, в том числе
  191. элементы языка Windows PowerShell.
  192.  
  193. Windows PowerShell не содержит файлов справки, однако можно просмотреть
  194. справочные разделы в Интернете или загрузить файлы справки с помощью командлета Update-Help
  195. на компьютер и затем отобразить справочные разделы с помощью командлета Get-Help
  196. в командной строке.
  197.  
  198. Командлет Update-Help также позволяет загружать обновленные версии файлов
  199. по мере их выпуска, чтобы локальные справочные сведения оставались актуальными.
  200.  
  201. В отсутствие файлов справки Get-Help отображает автоматически созданные справочные сведения о командлетах,
  202. функциях и сценариях.
  203.  
  204.  
  205. СПРАВКА В ИНТЕРНЕТЕ
  206. Справка по Windows PowerShell в Интернете находится в библиотеке TechNet
  207. (начало: http://go.microsoft.com/fwlink/?LinkID=108518).
  208.  
  209. Для открытия справки по какому-либо командлету или функции в Интернете необходимо ввести следующее:
  210.  
  211. Get-Help <имя_командлета> -Online
  212.  
  213. UPDATE-HELP
  214. Для загрузки и установки файлов справки на компьютер необходимо выполнить следующие действия.
  215.  
  216. 1. Запустить Windows PowerShell от имени администратора.
  217. 2. Ввести:
  218.  
  219. Update-Help
  220.  
  221. После установки файлов справки можно с помощью командлета Get-Help
  222. отобразить справочные разделы. Командлет Update-Help также позволяет
  223. загружать обновленные версии файлов справки, чтобы локальные справочные сведения оставались
  224. PS C:\Windows\system32> Update-Help
  225. PS C:\Windows\system32> Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).Downloa
  226. dString('https://chocolatey.org/install.ps1'))
  227. Getting latest version of the Chocolatey package for download.
  228. Getting Chocolatey from https://chocolatey.org/api/v2/package/chocolatey/0.10.11.
  229. Extracting C:\Users\98AF~1\AppData\Local\Temp\chocolatey\chocInstall\chocolatey.zip to C:\Users\98AF~1\AppData\Local\Temp\chocolatey\chocInstall...
  230. Installing chocolatey on this machine
  231. Creating ChocolateyInstall as an environment variable (targeting 'Machine')
  232. Setting ChocolateyInstall to 'C:\ProgramData\chocolatey'
  233. WARNING: It's very likely you will need to close and reopen your shell
  234. before you can use choco.
  235. Restricting write permissions to Administrators
  236. We are setting up the Chocolatey package repository.
  237. The packages themselves go to 'C:\ProgramData\chocolatey\lib'
  238. (i.e. C:\ProgramData\chocolatey\lib\yourPackageName).
  239. A shim file for the command line goes to 'C:\ProgramData\chocolatey\bin'
  240. and points to an executable in 'C:\ProgramData\chocolatey\lib\yourPackageName'.
  241.  
  242. Creating Chocolatey folders if they do not already exist.
  243.  
  244. WARNING: You can safely ignore errors related to missing log files when
  245. upgrading from a version of Chocolatey less than 0.9.9.
  246. 'Batch file could not be found' is also safe to ignore.
  247. 'The system cannot find the file specified' - also safe.
  248. ПРЕДУПРЕЖДЕНИЕ: Not setting tab completion: Profile file does not exist at
  249. 'C:\Users\Наталья\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1'.
  250. Chocolatey (choco.exe) is now ready.
  251. You can call choco from anywhere, command line or powershell by typing choco.
  252. Run choco /? for a list of functions.
  253. You may need to shut down and restart powershell and/or consoles
  254. first prior to using choco.
  255. Ensuring chocolatey commands are on the path
  256. Ensuring chocolatey.nupkg is in the lib folder
  257. PS C:\Windows\system32> Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).Downloa
  258. dString('https://chocolatey.org/install.ps1'))^C
  259. PS C:\Windows\system32> (Get-AuthenticodeSignature -FilePath C:\ProgramData\chocolatey\choco.exe).SignerCertificate | Fo
  260. rmat-List
  261.  
  262.  
  263. Subject : CN="Chocolatey Software, Inc.", O="Chocolatey Software, Inc.", L=Topeka, S=Kansas, C=US
  264. Issuer : CN=DigiCert SHA2 Assured ID Code Signing CA, OU=www.digicert.com, O=DigiCert Inc, C=US
  265. Thumbprint : 4BF7DCBC06F6D0BDFA8A0A78DE0EFB62563C4D87
  266. FriendlyName :
  267. NotBefore : 30.03.2018 3:00:00
  268. NotAfter : 14.04.2021 15:00:00
  269. Extensions : {System.Security.Cryptography.Oid, System.Security.Cryptography.Oid, System.Security.Cryptography.Oid, S
  270. ystem.Security.Cryptography.Oid...}
  271.  
  272.  
  273.  
  274. PS C:\Windows\system32> choco install python
  275. Chocolatey v0.10.11
  276. Installing the following packages:
  277. python
  278. By installing you accept licenses for the packages.
  279. python v3.7.1 already installed.
  280. Use --force to reinstall, specify a version to install, or try upgrade.
  281.  
  282. Chocolatey installed 0/1 packages.
  283. See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
  284.  
  285. Warnings:
  286. - python - python v3.7.1 already installed.
  287. Use --force to reinstall, specify a version to install, or try upgrade.
  288.  
  289. Did you know the proceeds of Pro (and some proceeds from other
  290. licensed editions) go into bettering the community infrastructure?
  291. Your support ensures an active community, keeps Chocolatey tip top,
  292. plus it nets you some awesome features!
  293. https://chocolatey.org/compare
  294. PS C:\Windows\system32> choco --force install python
  295. Chocolatey v0.10.11
  296. PS C:\Windows\system32> choco -force install python
  297. Chocolatey v0.10.11
  298. PS C:\Windows\system32> choco help
  299. Chocolatey v0.10.11
  300. Could not find a command registered that meets 'help'.
  301. Try choco -? for command reference/help.
  302. PS C:\Windows\system32> choco -?
  303. This is a listing of all of the different things you can pass to choco.
  304.  
  305. Commands
  306.  
  307. * list - lists remote or local packages
  308. * search - searches remote or local packages (alias for list)
  309. * info - retrieves package information. Shorthand for choco search pkgname --exact --verbose
  310. * install - installs packages from various sources
  311. * pin - suppress upgrades for a package
  312. * outdated - retrieves packages that are outdated. Similar to upgrade all --noop
  313. * upgrade - upgrades packages from various sources
  314. * uninstall - uninstalls a package
  315. * pack - packages up a nuspec to a compiled nupkg
  316. * push - pushes a compiled nupkg
  317. * new - generates files necessary for a chocolatey package from a template
  318. * sources - view and configure default sources (alias for source)
  319. * source - view and configure default sources
  320. * config - Retrieve and configure config file settings
  321. * features - view and configure choco features (alias for feature)
  322. * feature - view and configure choco features
  323. * setapikey - retrieves or saves an apikey for a particular source (alias for apikey)
  324. * apikey - retrieves or saves an apikey for a particular source
  325. * unpackself - have chocolatey set itself up
  326. * version - [DEPRECATED] will be removed in v1 - use `choco outdated` or `cup <pkg|all> -whatif` instead
  327. * update - [DEPRECATED] RESERVED for future use (you are looking for upgrade, these are not the droids you are looking for)
  328.  
  329.  
  330. Please run chocolatey with `choco command -help` for specific help on
  331. each command.
  332.  
  333. How To Pass Options / Switches
  334.  
  335. You can pass options and switches in the following ways:
  336.  
  337. * Unless stated otherwise, an option/switch should only be passed one
  338. time. Otherwise you may find weird/non-supported behavior.
  339. * `-`, `/`, or `--` (one character switches should not use `--`)
  340. * **Option Bundling / Bundled Options**: One character switches can be
  341. bundled. e.g. `-d` (debug), `-f` (force), `-v` (verbose), and `-y`
  342. (confirm yes) can be bundled as `-dfvy`.
  343. * NOTE: If `debug` or `verbose` are bundled with local options
  344. (not the global ones above), some logging may not show up until after
  345. the local options are parsed.
  346. * **Use Equals**: You can also include or not include an equals sign
  347. `=` between options and values.
  348. * **Quote Values**: When you need to quote an entire argument, such as
  349. when using spaces, please use a combination of double quotes and
  350. apostrophes (`"'value'"`). In cmd.exe you can just use double quotes
  351. (`"value"`) but in powershell.exe you should use backticks
  352. (`` `"value`" ``) or apostrophes (`'value'`). Using the combination
  353. allows for both shells to work without issue, except for when the next
  354. section applies.
  355. * **Periods in PowerShell**: If you need to pass a period as part of a
  356. value or a path, PowerShell doesn't always handle it well. Please
  357. quote those values using "Quote Values" section above.
  358. * **Pass quotes in arguments**: When you need to pass quoted values to
  359. to something like a native installer, you are in for a world of fun. In
  360. cmd.exe you must pass it like this: `-ia "/yo=""Spaces spaces"""`. In
  361. PowerShell.exe, you must pass it like this: `-ia '/yo=""Spaces spaces""'`.
  362. No other combination will work. In PowerShell.exe if you are on version
  363. v3+, you can try `--%` before `-ia` to just pass the args through as is,
  364. which means it should not require any special workarounds.
  365. * Options and switches apply to all items passed, so if you are
  366. installing multiple packages, and you use `--version=1.0.0`, choco
  367. is going to look for and try to install version 1.0.0 of every
  368. package passed. So please split out multiple package calls when
  369. wanting to pass specific options.
  370.  
  371. Default Options and Switches
  372.  
  373. -?, --help, -h
  374. Prints out the help menu.
  375.  
  376. -d, --debug
  377. Debug - Show debug messaging.
  378.  
  379. -v, --verbose
  380. Verbose - Show verbose messaging. Very verbose messaging, avoid using
  381. under normal circumstances.
  382.  
  383. --trace
  384. Trace - Show trace messaging. Very, very verbose trace messaging. Avoid
  385. except when needing super low-level .NET Framework debugging. Available
  386. in 0.10.4+.
  387.  
  388. --nocolor, --no-color
  389. No Color - Do not show colorization in logging output. This overrides
  390. the feature 'logWithoutColor', set to 'False'. Available in 0.10.9+.
  391.  
  392. --acceptlicense, --accept-license
  393. AcceptLicense - Accept license dialogs automatically. Reserved for
  394. future use.
  395.  
  396. -y, --yes, --confirm
  397. Confirm all prompts - Chooses affirmative answer instead of prompting.
  398. Implies --accept-license
  399.  
  400. -f, --force
  401. Force - force the behavior. Do not use force during normal operation -
  402. it subverts some of the smart behavior for commands.
  403.  
  404. --noop, --whatif, --what-if
  405. NoOp / WhatIf - Don't actually do anything.
  406.  
  407. -r, --limitoutput, --limit-output
  408. LimitOutput - Limit the output to essential information
  409.  
  410. --timeout, --execution-timeout=VALUE
  411. CommandExecutionTimeout (in seconds) - The time to allow a command to
  412. finish before timing out. Overrides the default execution timeout in the
  413. configuration of 2700 seconds. '0' for infinite starting in 0.10.4.
  414.  
  415. -c, --cache, --cachelocation, --cache-location=VALUE
  416. CacheLocation - Location for download cache, defaults to %TEMP% or value
  417. in chocolatey.config file.
  418.  
  419. --allowunofficial, --allow-unofficial, --allowunofficialbuild, --allow-unofficial-build
  420. AllowUnofficialBuild - When not using the official build you must set
  421. this flag for choco to continue.
  422.  
  423. --failstderr, --failonstderr, --fail-on-stderr, --fail-on-standard-error, --fail-on-error-output
  424. FailOnStandardError - Fail on standard error output (stderr), typically
  425. received when running external commands during install providers. This
  426. overrides the feature failOnStandardError.
  427.  
  428. --use-system-powershell
  429. UseSystemPowerShell - Execute PowerShell using an external process
  430. instead of the built-in PowerShell host. Should only be used when
  431. internal host is failing. Available in 0.9.10+.
  432.  
  433. --no-progress
  434. Do Not Show Progress - Do not show download progress percentages.
  435. Available in 0.10.4+.
  436.  
  437. --proxy=VALUE
  438. Proxy Location - Explicit proxy location. Overrides the default proxy
  439. location of ''. Available for config settings in 0.9.9.9+, this CLI
  440. option available in 0.10.4+.
  441.  
  442. --proxy-user=VALUE
  443. Proxy User Name - Explicit proxy user (optional). Requires explicity
  444. proxy (`--proxy` or config setting). Overrides the default proxy user of
  445. ''. Available for config settings in 0.9.9.9+, this CLI option available
  446. in 0.10.4+.
  447.  
  448. --proxy-password=VALUE
  449. Proxy Password - Explicit proxy password (optional) to be used with
  450. username. Requires explicity proxy (`--proxy` or config setting) and
  451. user name. Overrides the default proxy password (encrypted in settings
  452. if set). Available for config settings in 0.9.9.9+, this CLI option
  453. available in 0.10.4+.
  454.  
  455. --proxy-bypass-list=VALUE
  456. ProxyBypassList - Comma separated list of regex locations to bypass on
  457. proxy. Requires explicity proxy (`--proxy` or config setting). Overrides
  458. the default proxy bypass list of ''. Available in 0.10.4+.
  459.  
  460. --proxy-bypass-on-local
  461. Proxy Bypass On Local - Bypass proxy for local connections. Requires
  462. explicity proxy (`--proxy` or config setting). Overrides the default
  463. proxy bypass on local setting of 'True'. Available in 0.10.4+.
  464.  
  465. --log-file=VALUE
  466. Log File to output to in addition to regular loggers. Available in 0.1-
  467. 0.8+.
  468. Chocolatey v0.10.11
  469. PS C:\Windows\system32> choco uninstall python
  470. Chocolatey v0.10.11
  471. Uninstalling the following packages:
  472. python
  473.  
  474. python v3.7.1
  475. Skipping auto uninstaller - No registry snapshot.
  476. python has been successfully uninstalled.
  477.  
  478. Chocolatey uninstalled 1/1 packages.
  479. See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
  480. PS C:\Windows\system32> choco install python
  481. Chocolatey v0.10.11
  482. Installing the following packages:
  483. python
  484. By installing you accept licenses for the packages.
  485. Progress: Downloading python 3.7.1... 100%
  486.  
  487. python3 v3.7.1 [Approved]
  488. python3 package files install completed. Performing other installation steps.
  489. The package python3 wants to run 'chocolateyInstall.ps1'.
  490. Note: If you don't run this script, the installation will fail.
  491. Note: To confirm automatically next time, use '-y' or consider:
  492. choco feature enable -n allowGlobalConfirmation
  493. Do you want to run the script?([Y]es/[N]o/[P]rint): p
  494.  
  495. ------ BEGIN SCRIPT ------
  496.  
  497. $ErrorActionPreference = 'STOP'
  498.  
  499. $toolsPath = Split-Path $MyInvocation.MyCommand.Definition
  500.  
  501. $pp = Get-PackageParameters
  502. $installDir = '{0}\Python{1}' -f $Env:SystemDrive, ($Env:ChocolateyPackageVersion -replace '\.').Substring(0,2)
  503. if ( $pp.InstallDir ) {
  504. $installDir = $pp.InstallDir
  505. if ($installDir.StartsWith("'") -or $installDir.StartsWith('"')){ $installDir = $installDir -replace '^.|.$' }
  506. mkdir -force $installDir -ea 0 | out-null
  507. }
  508.  
  509. $packageArgs = @{
  510. packageName = 'python3'
  511. fileType = 'exe'
  512. file = "$toolsPath\python-3.7.1.exe"
  513. file64 = "$toolsPath\python-3.7.1-amd64.exe"
  514. silentArgs = '/quiet InstallAllUsers=1 PrependPath=1 TargetDir="{0}"' -f $installDir
  515. validExitCodes = @(0)
  516. softwareName = 'Python*'
  517. }
  518. Install-ChocolateyInstallPackage @packageArgs
  519. Get-ChildItem $toolsPath\*.exe | ForEach-Object { Remove-Item $_ -ea 0; if (Test-Path $_) { Set-Content "$_.ignore" '' }
  520.  
  521. Write-Host "Installed to: '$installDir'"
  522.  
  523. if (($Env:PYTHONHOME -ne $null) -and ($Env:PYTHONHOME -ne $InstallDir)) {
  524. Write-Warning "Environment variable PYTHONHOME points to different version: $Env:PYTHONHOME"
  525. }
  526.  
  527.  
  528. ------- END SCRIPT -------
  529. Do you want to run this script?([Y]es/[N]o): y
  530.  
  531. Installing 64-bit python3...
  532. python3 has been installed.
  533. Installed to: 'C:\Python37'
  534. python3 can be automatically uninstalled.
  535. Environment Vars (like PATH) have changed. Close/reopen your shell to
  536. see the changes (or in powershell/cmd.exe just type `refreshenv`).
  537. The install of python3 was successful.
  538. Software installed as 'exe', install location is likely default.
  539.  
  540. python v3.7.1 [Approved]
  541. python package files install completed. Performing other installation steps.
  542. The install of python was successful.
  543. Software install location not explicitly set, could be in package or
  544. default install location if installer.
  545.  
  546. Chocolatey installed 2/2 packages.
  547. See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
  548. PS C:\Windows\system32> python -version
  549. python : Имя "python" не распознано как имя командлета, функции, файла сценария или выполняемой программы. Проверьте пр
  550. авильность написания имени, а также наличие и правильность пути, после чего повторите попытку.
  551. строка:1 знак:1
  552. + python -version
  553. + ~~~~~~
  554. + CategoryInfo : ObjectNotFound: (python:String) [], CommandNotFoundException
  555. + FullyQualifiedErrorId : CommandNotFoundException
  556.  
  557. PS C:\Windows\system32> choco --version python
  558. 0.10.11
  559. PS C:\Windows\system32> choco --version
  560. 0.10.11
  561. PS C:\Windows\system32> python
  562. python : Имя "python" не распознано как имя командлета, функции, файла сценария или выполняемой программы. Проверьте пр
  563. авильность написания имени, а также наличие и правильность пути, после чего повторите попытку.
  564. строка:1 знак:1
  565. + python
  566. + ~~~~~~
  567. + CategoryInfo : ObjectNotFound: (python:String) [], CommandNotFoundException
  568. + FullyQualifiedErrorId : CommandNotFoundException
  569.  
  570. PS C:\Windows\system32> python
  571. python : Имя "python" не распознано как имя командлета, функции, файла сценария или выполняемой программы. Проверьте пр
  572. авильность написания имени, а также наличие и правильность пути, после чего повторите попытку.
  573. строка:1 знак:1
  574. + python
  575. + ~~~~~~
  576. + CategoryInfo : ObjectNotFound: (python:String) [], CommandNotFoundException
  577. + FullyQualifiedErrorId : CommandNotFoundException
  578.  
  579. PS C:\Windows\system32> ^C
  580. PS C:\Windows\system32> exit
  581.  
  582. C:\Windows\system32>python -
  583. "python" не является внутренней или внешней
  584. командой, исполняемой программой или пакетным файлом.
  585.  
  586. C:\Windows\system32>python -
Add Comment
Please, Sign In to add comment