Ib qho kev nthuav txuj ci tseem ceeb tshaj plaws nyob rau hauv Windows 10 uas ib tus neeg siv dog dig tsis tuaj yeem ceeb toom yog tus ua ke PackageManagement pob tus thawj tswj hwm (yav dhau los OneGet), uas ua rau nws yooj yim rau nruab, tshawb thiab lwm yam tswj hwm cov kev pabcuam hauv koj lub computer. Nws yog hais txog kev txhim kho cov kev pab cuam los ntawm cov kab hais kom ua, thiab yog tias nws tsis tau paub meej rau koj tias qhov no yog dab tsi thiab vim li cas nws yuav pab tau, Kuv xav kom koj saib cov yees duab ua ntej ntawm phau ntawv no.
Hloov tshiab 2016: tus thawj tswj hwm pob tsa ua ke tau raug hu ua OneGet thaum lub sijhawm tso ua ntej ntawm Windows 10, tam sim no nws yog PackageManagement module hauv PowerShell. Tsis tas li ntawd hauv cov lus qhia kho tshiab txoj hauv kev siv nws.
PackageManagement yog qhov tseem ceeb ntawm PowerShell hauv Windows 10; ntxiv rau, koj tuaj yeem nqa cov neeg saib xyuas pob los ntawm kev txhim kho Windows Management Framework 5.0 rau Windows 8.1. Hauv tsab xov xwm no, muaj ntau cov piv txwv ntawm kev siv lub pob tswj hwm rau tus neeg siv nruab nrab, nrog rau txoj hauv kev los txuas rau Chocolatey lub chaw cia khoom (ib hom ntawm cov chaw khaws ntaub ntawv, khaws cia) hauv PackageManagement (Chocolatey yog tus neeg saib xyuas pob khoom ywj pheej uas koj tuaj yeem siv hauv Windows XP, 7 thiab 8 thiab sib nug xov Kawm kom paub ntxiv txog kev siv Chocolatey raws li tus neeg saib xyuas pob khoom.)
PackageManagement Cov Lus Cog Tseg hauv PowerShell
Txhawm rau siv feem ntau ntawm cov lus txib tau piav qhia hauv qab no, koj yuav tsum khiav Windows PowerShell ua tus thawj coj.
Ua li no, pib ntaus PowerShell hauv txoj haujlwm tshawb nrhiav, tom qab ntawd mam li nyem rau ntawm qhov tshwm sim thiab xaiv "Run as Administrator".
PackageManagement lossis OneGet pob tus thawj saib xyuas tso cai rau koj los ua haujlwm nrog cov programs (nruab, nruab, rho tawm, tshawb nrhiav, txhim kho tseem tsis tau muab) hauv PowerShell siv cov lus txib uas tsim nyog - cov qauv zoo sib xws rau cov neeg siv Linux. Txhawm rau tau txais lub tswv yim dab tsi ntawm cov ntawv pov thawj, koj tuaj yeem saib lub screenshot hauv qab no.
Qhov zoo ntawm txoj kev no ntawm kev txhim kho cov kev pab cuam yog:
- siv cov khoom pov thawj ntawm cov kev pab cuam (koj tsis tas yuav tshawb xyuas phau ntawv rau lub vev xaib raug cai),
- tsis muaj cov teeb tsa ntawm cov software uas tsis xav tau thaum lub sijhawm teeb tsa (thiab cov txheej txheem teeb tsa feem ntau paub nrog lub khawm "Tom ntej"),
- lub peev xwm los tsim cov ntawv sau installation (piv txwv li, yog tias koj xav tau los nruab tag nrho cov kev pab cuam ntawm lub khoos phis tawj tshiab lossis tom qab rov nruab Windows, koj tsis tas yuav manually sau thiab nruab rau lawv, cia li khiav ntawm tsab ntawv),
- raws li kev yooj yim ntawm kev teeb tsa thiab kev tswj hwm software ntawm tej thaj chaw deb tshuab (rau cov tswj hwm system).
Koj tuaj yeem tau txais cov npe kab lus txib uas muaj nyob hauv PackageManagement siv Txais-hais kom ua -Module PackageManagement tus yuam sij rau tus neeg siv yooj yim yuav yog:
- Nrhiav Qhov Ncaws Pob - nrhiav pob (qhov program), piv txwv li: Nrhiav-Hnov -Name VLC (Lub npe parameter tuaj yeem hla tau, rooj plaub no tsis tseem ceeb).
- Install-Package - nruab qhov program nyob rau hauv computer
- Uninstall-Package - tshem tawm ib qho program
- Get-Package - Saib rau pob khoom raug ntsia
Cov nqe lus txib ntxiv yog tsim los saib cov peev txheej ntawm pob khoom (cov programs), ntxiv thiab tshem lawv. Cov yeeb yam no tseem muaj txiaj ntsig zoo rau peb.
Ntxiv Chocolate qhob cia rau PackageManagement (OneGet)
Hmoov tsis zoo, tsawg tuaj yeem pom nyob hauv cov chaw cia khoom siv (chaw ua haujlwm) uas PackageManagement ua haujlwm nrog, tshwj xeeb tshaj yog thaum nws los ua kev lag luam (tab sis tib lub sijhawm pub dawb) cov khoom lag luam - Google Chrome, Skype, ntau cov ntawv thov kev pab cuam thiab khoom siv.
Microsoft lub tswv yim NuGet qhov chaw khaws cia rau kev teeb tsa los ntawm lub neej ntawd muaj cov cuab yeej tsim kho rau cov programmer, tab sis tsis yog rau cov neeg nyeem ib txwm ntawm kuv (los ntawm txoj kev, thaum ua haujlwm nrog PackageManagement koj yuav tau qhia tas li rau nruab NuGet tus muab kev pab, Kuv tsis tau pom ib txoj hauv kev "kom tshem tawm" ntawm qhov no, tshwj tsis yog pom zoo ib zaug nrog installation).
Txawm li cas los xij, cov teeb meem tuaj yeem daws tau los ntawm kev sib txuas ntawm Chocolatey pob tus nai thawj tswj chaw ntim, kom ua qhov no, siv cov lus txib:
Get-PackageProvider -Txoj khoom qab zib
Paub meej tias Chocolatey tus kws muab kev pabcuam teeb tsa, thiab tom qab kev teeb tsa, nkag mus rau cov lus txib:
Txheej-PackageSource -Txoj khoom qab zib -qhov tseeb
Ua li cas.
Cov kev txiav txim kawg uas yuav xav tau rau pob khoom chocolate yuav tsum yog hloov pauv ntawm Txoj Haujlwm-Txoj Cai. Txhawm rau hloov, nkag mus rau cov lus txib uas tso cai rau tag nrho cov PowerShell kos npe scripts kom raug tua:
Teeb-ExecutionPolicy RemoteSigned
Qhov lus txib tso cai siv cov ntawv sau kos npe rub tawm hauv Is Taws Nem.
Txij tam sim no, cov pob los ntawm Chocolate rov ua haujlwm yuav ua haujlwm hauv PackageManagement (OneGet). Yog tias muaj qhov yuam kev thaum lub sijhawm lawv teeb tsa, sim siv qhov ntsuas -Qhov txim.
Thiab tam sim no ib qho piv txwv yooj yim ntawm kev siv PackageManagement nrog Chocolatey cov chaw pabcuam tau txuas nrog.
- Piv txwv, peb yuav tsum tau nruab qhov kev pab cuam Paint.net dawb (qhov no yuav yog lwm qhov kev pabcuam pub dawb, feem ntau ntawm cov khoos phis pub dawb nyob hauv lub chaw cia khoom). Ntaus qhov hais kom ua nrhiav-pob-npe xim (koj tuaj yeem sau lub npe ib nrab, yog tias koj tsis paub lub npe ntawm pob, "" -name "qhov tseem ceeb yog xaiv tau).
- Raws li qhov tshwm sim, peb pom tias paint.net tam sim no nyob hauv lub chaw sau ntawv. Txhawm rau nruab, siv cov lus txib nruab-pob-npe paint.net (peb siv lub npe meej los ntawm kem seem).
- Peb tos kom txog thaum lub installation tiav thiab peb tau txais cov kev pabcuam tsim tsis saib rau qhov twg mus rub tawm thiab tsis tau txais txoj kev tsis xav tau cov software ntawm koj lub khoos phis tawm.
Ua Yeeb yaj kiab - Siv PackageManagement pob tus thawj tswj hwm (aka OneGet) txhawm rau txhim kho cov haujlwm ntawm Windows 10
Zoo, thaum kawg - nws zoo ib yam, tab sis hom vis dis aus, tej zaum rau qee tus nyeem nws yuav nkag siab yooj yim tias qhov no muaj txiaj ntsig zoo rau nws lossis tsis.
Tam sim no, peb yuav pom tias cov kev tswj hwm pob yuav saib zoo li cas yav tom ntej: muaj cov ntaub ntawv hais txog qhov pom tshwm sim ntawm OneGet GUI thiab hais txog kev txhawb nqa ntawm desktop daim ntawv thov los ntawm Windows Store thiab lwm yam kev txhim kho kev cia siab ntawm cov khoom lag luam.