Difference between revisions of "Chocolatey"
From Hack Sphere Labs Wiki
(→Allow Global Confirmation) |
(→Enable/Disable Sources) |
||
(One intermediate revision by the same user not shown) | |||
Line 10: | Line 10: | ||
choco source add -name host -source \\host\path\choco\ | choco source add -name host -source \\host\path\choco\ | ||
choco source add -n=name -s\\server\share\folder | choco source add -n=name -s\\server\share\folder | ||
+ | |||
+ | =Enable/Disable Sources= | ||
+ | choco source enable --name chocolatey | ||
+ | choco source disable --name chocolatey | ||
=General Commands= | =General Commands= |
Latest revision as of 09:22, 31 August 2015
Contents
Install
Administrative cmd.exe
@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
Creating Repos
Cifs/Samba
You just have to put .nupkg files in the dir, Chocolatey will parse through them.
Adding Sources
choco source add -name host -source \\host\path\choco\ choco source add -n=name -s\\server\share\folder
Enable/Disable Sources
choco source enable --name chocolatey choco source disable --name chocolatey
General Commands
choco upgrade
Allow Global Confirmation
choco feature enable -n allowGlobalConfirmation choco feature disable -n allowGlobalConfirmation
Remove AddRemovePrograms On Uninstall
choco feature enable -n autoUninstaller choco feature disable -n autoUninstaller
Upgrade Chocolatey
choco upgrade chocolatey
Packages
choco new -h
choco pack -h
nuspec
zipdetails -vvv flashplayerplugin.18.0.0.232.nupkg 0000 0004 50 4B 03 04 LOCAL HEADER #1 04034B50 0004 0001 0A Extract Zip Spec 0A '1.0' 0005 0001 00 Extract OS 00 'MS-DOS' 0006 0002 00 00 General Purpose Flag 0000 0008 0002 00 00 Compression Method 0000 'Stored' 000A 0004 1D 30 0B 47 Last Mod Time 470B301D 'Tue Aug 11 06:00:58 2015' 000E 0004 69 D5 58 8D CRC 8D58D569 0012 0004 F6 01 00 00 Compressed Length 000001F6 0016 0004 F6 01 00 00 Uncompressed Length 000001F6 001A 0002 0B 00 Filename Length 000B 001C 0002 1C 00 Extra Length 001C 001E 000B 5F 72 65 6C Filename '_rels/.rels' 73 2F 2E 72 65 6C 73 0029 0002 20 A2 Extra ID #0001 A220 'Microsoft Microsoft Open Packaging Growth Hint' 002B 0002 18 00 Length 0018 002D 0018 28 A0 14 00 Extra Payload 28 A0 14 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0045 01F6 ... PAYLOAD 023B 0004 50 4B 03 04 LOCAL HEADER #2 04034B50 023F 0001 14 Extract Zip Spec 14 '2.0' 0240 0001 00 Extract OS 00 'MS-DOS' 0241 0002 02 00 General Purpose Flag 0002 [Bits 1-2] 2 'Fast Compression' 0243 0002 08 00 Compression Method 0008 'Deflated' 0245 0004 1D 30 0B 47 Last Mod Time 470B301D 'Tue Aug 11 06:00:58 2015' 0249 0004 F7 9D 9A DE CRC DE9A9DF7 024D 0004 1D 02 00 00 Compressed Length 0000021D 0251 0004 1B 04 00 00 Uncompressed Length 0000041B 0255 0002 18 00 Filename Length 0018 0257 0002 1C 00 Extra Length 001C 0259 0018 66 6C 61 73 Filename 'flashplayerplugin.nuspec' 68 70 6C 61 79 65 72 70 6C 75 67 69 6E 2E 6E 75 73 70 65 63 0271 0002 20 A2 Extra ID #0001 A220 'Microsoft Microsoft Open Packaging Growth Hint' 0273 0002 18 00 Length 0018 0275 0018 28 A0 14 00 Extra Payload 28 A0 14 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 028D 021D ... PAYLOAD 04AA 0004 50 4B 03 04 LOCAL HEADER #3 04034B50 04AE 0001 14 Extract Zip Spec 14 '2.0' 04AF 0001 00 Extract OS 00 'MS-DOS' 04B0 0002 02 00 General Purpose Flag 0002 [Bits 1-2] 2 'Fast Compression' 04B2 0002 08 00 Compression Method 0008 'Deflated' 04B4 0004 1D 30 0B 47 Last Mod Time 470B301D 'Tue Aug 11 06:00:58 2015' 04B8 0004 61 CA 96 2C CRC 2C96CA61 04BC 0004 BC 01 00 00 Compressed Length 000001BC 04C0 0004 EF 02 00 00 Uncompressed Length 000002EF 04C4 0002 1B 00 Filename Length 001B 04C6 0002 1C 00 Extra Length 001C 04C8 001B 74 6F 6F 6C Filename 'tools/chocolateyInstall.ps1' 73 2F 63 68 6F 63 6F 6C 61 74 65 79 49 6E 73 74 61 6C 6C 2E 70 73 31 04E3 0002 20 A2 Extra ID #0001 A220 'Microsoft Microsoft Open Packaging Growth Hint' 04E5 0002 18 00 Length 0018 04E7 0018 28 A0 14 00 Extra Payload 28 A0 14 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 04FF 01BC ... PAYLOAD 06BB 0004 50 4B 03 04 LOCAL HEADER #4 04034B50 06BF 0001 0A Extract Zip Spec 0A '1.0' 06C0 0001 00 Extract OS 00 'MS-DOS' 06C1 0002 00 00 General Purpose Flag 0000 06C3 0002 00 00 Compression Method 0000 'Stored' 06C5 0004 1D 30 0B 47 Last Mod Time 470B301D 'Tue Aug 11 06:00:58 2015' 06C9 0004 1C 9A 2C 9D CRC 9D2C9A1C 06CD 0004 6C 03 00 00 Compressed Length 0000036C 06D1 0004 6C 03 00 00 Uncompressed Length 0000036C 06D5 0002 51 00 Filename Length 0051 06D7 0002 1C 00 Extra Length 001C 06D9 0051 70 61 63 6B Filename 'package/services/metadata/core- 61 67 65 2F properties/6a29db303ab4492c999903907e 73 65 72 76 528f06.psmdcp' 69 63 65 73 2F 6D 65 74 61 64 61 74 61 2F 63 6F 72 65 2D 70 72 6F 70 65 72 74 69 65 73 2F 36 61 32 39 64 62 33 30 33 61 62 34 34 39 32 63 39 39 39 39 30 33 39 30 37 65 35 32 38 66 30 36 2E 70 73 6D 64 63 70 072A 0002 20 A2 Extra ID #0001 A220 'Microsoft Microsoft Open Packaging Growth Hint' 072C 0002 18 00 Length 0018 072E 0018 28 A0 14 00 Extra Payload 28 A0 14 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0746 036C ... PAYLOAD 0AB2 0004 50 4B 03 04 LOCAL HEADER #5 04034B50 0AB6 0001 0A Extract Zip Spec 0A '1.0' 0AB7 0001 00 Extract OS 00 'MS-DOS' 0AB8 0002 00 00 General Purpose Flag 0000 0ABA 0002 00 00 Compression Method 0000 'Stored' 0ABC 0004 1D 30 0B 47 Last Mod Time 470B301D 'Tue Aug 11 06:00:58 2015' 0AC0 0004 55 E0 64 2C CRC 2C64E055 0AC4 0004 C0 01 00 00 Compressed Length 000001C0 0AC8 0004 C0 01 00 00 Uncompressed Length 000001C0 0ACC 0002 13 00 Filename Length 0013 0ACE 0002 1C 00 Extra Length 001C 0AD0 0013 5B 43 6F 6E Filename '[Content_Types].xml' 74 65 6E 74 5F 54 79 70 65 73 5D 2E 78 6D 6C 0AE3 0002 20 A2 Extra ID #0001 A220 'Microsoft Microsoft Open Packaging Growth Hint' 0AE5 0002 18 00 Length 0018 0AE7 0018 28 A0 14 00 Extra Payload 28 A0 14 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0AFF 01C0 ... PAYLOAD 0CBF 0004 50 4B 01 02 CENTRAL HEADER #1 02014B50 0CC3 0001 2D Created Zip Spec 2D '4.5' 0CC4 0001 00 Created OS 00 'MS-DOS' 0CC5 0001 0A Extract Zip Spec 0A '1.0' 0CC6 0001 00 Extract OS 00 'MS-DOS' 0CC7 0002 00 00 General Purpose Flag 0000 0CC9 0002 00 00 Compression Method 0000 'Stored' 0CCB 0004 1D 30 0B 47 Last Mod Time 470B301D 'Tue Aug 11 06:00:58 2015' 0CCF 0004 69 D5 58 8D CRC 8D58D569 0CD3 0004 F6 01 00 00 Compressed Length 000001F6 0CD7 0004 F6 01 00 00 Uncompressed Length 000001F6 0CDB 0002 0B 00 Filename Length 000B 0CDD 0002 00 00 Extra Length 0000 0CDF 0002 00 00 Comment Length 0000 0CE1 0002 00 00 Disk Start 0000 0CE3 0002 00 00 Int File Attributes 0000 [Bit 0] 0 'Binary Data' 0CE5 0004 00 00 00 00 Ext File Attributes 00000000 0CE9 0004 00 00 00 00 Local Header Offset 00000000 0CED 000B 5F 72 65 6C Filename '_rels/.rels' 73 2F 2E 72 65 6C 73 0CF8 0004 50 4B 01 02 CENTRAL HEADER #2 02014B50 0CFC 0001 2D Created Zip Spec 2D '4.5' 0CFD 0001 00 Created OS 00 'MS-DOS' 0CFE 0001 14 Extract Zip Spec 14 '2.0' 0CFF 0001 00 Extract OS 00 'MS-DOS' 0D00 0002 02 00 General Purpose Flag 0002 [Bits 1-2] 2 'Fast Compression' 0D02 0002 08 00 Compression Method 0008 'Deflated' 0D04 0004 1D 30 0B 47 Last Mod Time 470B301D 'Tue Aug 11 06:00:58 2015' 0D08 0004 F7 9D 9A DE CRC DE9A9DF7 0D0C 0004 1D 02 00 00 Compressed Length 0000021D 0D10 0004 1B 04 00 00 Uncompressed Length 0000041B 0D14 0002 18 00 Filename Length 0018 0D16 0002 00 00 Extra Length 0000 0D18 0002 00 00 Comment Length 0000 0D1A 0002 00 00 Disk Start 0000 0D1C 0002 00 00 Int File Attributes 0000 [Bit 0] 0 'Binary Data' 0D1E 0004 00 00 00 00 Ext File Attributes 00000000 0D22 0004 3B 02 00 00 Local Header Offset 0000023B 0D26 0018 66 6C 61 73 Filename 'flashplayerplugin.nuspec' 68 70 6C 61 79 65 72 70 6C 75 67 69 6E 2E 6E 75 73 70 65 63 0D3E 0004 50 4B 01 02 CENTRAL HEADER #3 02014B50 0D42 0001 2D Created Zip Spec 2D '4.5' 0D43 0001 00 Created OS 00 'MS-DOS' 0D44 0001 14 Extract Zip Spec 14 '2.0' 0D45 0001 00 Extract OS 00 'MS-DOS' 0D46 0002 02 00 General Purpose Flag 0002 [Bits 1-2] 2 'Fast Compression' 0D48 0002 08 00 Compression Method 0008 'Deflated' 0D4A 0004 1D 30 0B 47 Last Mod Time 470B301D 'Tue Aug 11 06:00:58 2015' 0D4E 0004 61 CA 96 2C CRC 2C96CA61 0D52 0004 BC 01 00 00 Compressed Length 000001BC 0D56 0004 EF 02 00 00 Uncompressed Length 000002EF 0D5A 0002 1B 00 Filename Length 001B 0D5C 0002 00 00 Extra Length 0000 0D5E 0002 00 00 Comment Length 0000 0D60 0002 00 00 Disk Start 0000 0D62 0002 00 00 Int File Attributes 0000 [Bit 0] 0 'Binary Data' 0D64 0004 00 00 00 00 Ext File Attributes 00000000 0D68 0004 AA 04 00 00 Local Header Offset 000004AA 0D6C 001B 74 6F 6F 6C Filename 'tools/chocolateyInstall.ps1' 73 2F 63 68 6F 63 6F 6C 61 74 65 79 49 6E 73 74 61 6C 6C 2E 70 73 31 0D87 0004 50 4B 01 02 CENTRAL HEADER #4 02014B50 0D8B 0001 2D Created Zip Spec 2D '4.5' 0D8C 0001 00 Created OS 00 'MS-DOS' 0D8D 0001 0A Extract Zip Spec 0A '1.0' 0D8E 0001 00 Extract OS 00 'MS-DOS' 0D8F 0002 00 00 General Purpose Flag 0000 0D91 0002 00 00 Compression Method 0000 'Stored' 0D93 0004 1D 30 0B 47 Last Mod Time 470B301D 'Tue Aug 11 06:00:58 2015' 0D97 0004 1C 9A 2C 9D CRC 9D2C9A1C 0D9B 0004 6C 03 00 00 Compressed Length 0000036C 0D9F 0004 6C 03 00 00 Uncompressed Length 0000036C 0DA3 0002 51 00 Filename Length 0051 0DA5 0002 00 00 Extra Length 0000 0DA7 0002 00 00 Comment Length 0000 0DA9 0002 00 00 Disk Start 0000 0DAB 0002 00 00 Int File Attributes 0000 [Bit 0] 0 'Binary Data' 0DAD 0004 00 00 00 00 Ext File Attributes 00000000 0DB1 0004 BB 06 00 00 Local Header Offset 000006BB 0DB5 0051 70 61 63 6B Filename 'package/services/metadata/core- 61 67 65 2F properties/6a29db303ab4492c999903907e 73 65 72 76 528f06.psmdcp' 69 63 65 73 2F 6D 65 74 61 64 61 74 61 2F 63 6F 72 65 2D 70 72 6F 70 65 72 74 69 65 73 2F 36 61 32 39 64 62 33 30 33 61 62 34 34 39 32 63 39 39 39 39 30 33 39 30 37 65 35 32 38 66 30 36 2E 70 73 6D 64 63 70 0E06 0004 50 4B 01 02 CENTRAL HEADER #5 02014B50 0E0A 0001 2D Created Zip Spec 2D '4.5' 0E0B 0001 00 Created OS 00 'MS-DOS' 0E0C 0001 0A Extract Zip Spec 0A '1.0' 0E0D 0001 00 Extract OS 00 'MS-DOS' 0E0E 0002 00 00 General Purpose Flag 0000 0E10 0002 00 00 Compression Method 0000 'Stored' 0E12 0004 1D 30 0B 47 Last Mod Time 470B301D 'Tue Aug 11 06:00:58 2015' 0E16 0004 55 E0 64 2C CRC 2C64E055 0E1A 0004 C0 01 00 00 Compressed Length 000001C0 0E1E 0004 C0 01 00 00 Uncompressed Length 000001C0 0E22 0002 13 00 Filename Length 0013 0E24 0002 00 00 Extra Length 0000 0E26 0002 00 00 Comment Length 0000 0E28 0002 00 00 Disk Start 0000 0E2A 0002 00 00 Int File Attributes 0000 [Bit 0] 0 'Binary Data' 0E2C 0004 00 00 00 00 Ext File Attributes 00000000 0E30 0004 B2 0A 00 00 Local Header Offset 00000AB2 0E34 0013 5B 43 6F 6E Filename '[Content_Types].xml' 74 65 6E 74 5F 54 79 70 65 73 5D 2E 78 6D 6C 0E47 0004 50 4B 05 06 END CENTRAL HEADER 06054B50 0E4B 0002 00 00 Number of this disk 0000 0E4D 0002 00 00 Central Dir Disk no 0000 0E4F 0002 05 00 Entries in this disk 0005 0E51 0002 05 00 Total Entries 0005 0E53 0004 88 01 00 00 Size of Central Dir 00000188 0E57 0004 BF 0C 00 00 Offset to Central Dir 00000CBF 0E5B 0002 00 00 Comment Length 0000 Done
auto unpack and auto pack
ls *.zip|awk -F'.zip' '{print "unzip "$0" -d "$1}'|sh
to
ls *.nupkg|awk -F'.nupkg' '{print "unzip "$0" -d "$1}'|sh rm *.nupkg for i in */; do zip -0 -r "${i%/}.zip" "$i"; done
apt-get install mono-complete