Difference between revisions of "Chocolatey"

From HackerNet
Jump to: navigation, search
m
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
Chocolatey är en pakethanterare för Windows, som apt-get och yum.
+
Chocolatey är en pakethanterare för Windows, som [[apt]] och yum.
  
 
==Installation==
 
==Installation==
 +
Du kan installera via cmd eller powershell.
 +
===CMD===
 +
Kör cmd som admin.
 +
@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SETPATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
 +
 +
===Powershell===
 
Kör powershell som admin.
 
Kör powershell som admin.
 
<syntaxhighlight lang=powershell>iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))</syntaxhighlight>
 
<syntaxhighlight lang=powershell>iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))</syntaxhighlight>
 +
 +
Se till att <code>Get-ExecutionPolicy</code> är satt till bypass.
 +
Set-ExecutionPolicy bypass
  
 
==Exempel==
 
==Exempel==
 +
'''Installera'''
 +
 
Starta cmd som admin och skriv,
 
Starta cmd som admin och skriv,
 
  choco install git 7zip vlc firefox -y
 
  choco install git 7zip vlc firefox -y
  
===GUI===
+
'''Söka'''
 +
choco search firefox
 +
 
 +
==GUI==
 
  choco install chocolateygui
 
  choco install chocolateygui
 
[[Category:Windows]]
 
[[Category:Windows]]

Latest revision as of 16:35, 15 February 2016

Chocolatey är en pakethanterare för Windows, som apt och yum.

Installation

Du kan installera via cmd eller powershell.

CMD

Kör cmd som admin.

@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SETPATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin

Powershell

Kör powershell som admin.

iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))

Se till att Get-ExecutionPolicy är satt till bypass.

Set-ExecutionPolicy bypass

Exempel

Installera

Starta cmd som admin och skriv,

choco install git 7zip vlc firefox -y

Söka

choco search firefox

GUI

choco install chocolateygui