Presentation is loading. Please wait.

Presentation is loading. Please wait.

Windows Application Packaging with Chocolatey

Similar presentations


Presentation on theme: "Windows Application Packaging with Chocolatey"— Presentation transcript:

1 Windows Application Packaging with Chocolatey
Keith Garner @KeithGa1 Solutions Architect at 1E Michael Niehaus @MNiehaus Marketing Director at Microsoft

2 Keith Garner Michael Niehaus @KeithGa1 @MNiehaus
MDT Dev/PM, Microsoft MVP MDT Dev/PM, Windows Guru Way too long… Been here, done that… Ran Mercer Is. ½ Marathon Ran Mercer Is. ½ Marathon

3 About Keith Working in/around Microsoft for over 20 years Speaker at MMS, TechEd, and more… Microsoft IT MCS/Support/WHQL/Marketing/… Windows PG, Surface PG Oh and … SCCM / MDT Now working for 1E – Solution Architect

4 Overview Application Packaging – State of the union What is Chocolatey? OneGet? NuGet? How do I create Application packages in Chocolatey? How can this help me with MDT/SCCM? What is the Future of Application Packaging

5 Background/History Laziness is good… When channeled constructively
Problem: It’s hard to install drivers Idea: Use the PnP ID to help pick out the correct drivers Gotcha: Not all drivers ready as *.INF, and don’t play well with others Problem: Installing patches/updates is hard Idea: Write a script to connect to WU and install everything Gotcha: Not all patches from WU should be applied Problem: Installing Applications is a pain….

6 State of the Union Application Packaging

7 In the Beginning… We installed ran programs from Floppy disks… We got Hard Disks, which required copying… We developed libraries, and gave us DLL Hell Runme.bat Install.exe Setup.exe

8 Microsoft Installer MSI…
Industry standard for Desktop App Installation Created Circa Windows 2000 / Office 2000 Mini-database format for Files, Registry, … Supports Automation, Patching, Rollbacks, Removal… Custom Actions Supported by many tools… WIX, Orca, Install Shield… Challenges: Supports Custom Actions

9 …Microsoft Installer MSI
MSIExec.exe /i <File>.msi MSIExec.exe /quiet /norestart /i <File>.msi MSIExec.exe /qb- /norestart /l*vx %temp%\<file>.log /i <File>.msi Msiexec.exe /qb- /l*vx %LogPath%\MDT.log /norestart /i F28EB937B060/MicrosoftDeploymentToolkit2013_x64.msi

10 Challenges with Application Packaging
Applications come in all sizes: Tiny to SCCM OS dependencies ( .NET 3.5 vs .NET 4.5 ) prerequisites ( VCRT, .NET, Java, etc..) Hardware requirements (x86 vs x64) Lack of automation EULA!?!? AD Ware, unwanted packages, Malware! <shudder> Install via EXE, MSI … <shudder> BAT, PS1…

11 What makes an App Packageable?
RULE: Provide the ability to install unattended /q /Silent /Quiet /s RULE: Do not display Blocking UI Are you really sure you want to install this package silently? RULE: Do not exit until done, really done! Some Driver Packages, Office C2R. RULE: No rebooting Exit code 3010 ERROR_SUCCESS_REBOOT_REQUIRED Model Citizen: MSI Packages!

12 Getting more information…
Goto to Open up a sample package like “Adobe Acrobat Reader” If time, try out orca.exe

13 Application Virtualization
Solution – App-V Application Virtualization Use Packaging tool to snapshot a Desktop App Stream the application and Keep in a sandbox Run Multiple versions of the same problem Keep the dependencies in check Now with better support in SCCM ? App-V Client built-into Windows 10 RS1 ?

14 Universal Windows Apps (Metro … Modern … Store apps)
Solution – UWA Universal Windows Apps (Metro … Modern … Store apps) Runs on a wide range of platforms. Windows Store for Business - makes UWA better. Download APPX files! License Mgmt!

15 New Solution – AppV + UWA
Combine: Application Virtualization (App-V) Universal Windows Apps (UWA) Result: Project Centennial. Package Desktop Apps into Appx Available on Windows Store! AND *Extend* UWA API’s back to Desktop apps.

16 There is a lot of legacy, but a lot of new stuff. Recommendations:
State of the union There is a lot of legacy, but a lot of new stuff. Recommendations: Use MSI packages, and ask for them by name. Orca (Part of the Windows SDK) Others: Get info from

17 Meanwhile… Over on the developer side…

18 Visual Studio has NuGet
NUGET is a package manager for the Microsoft “Development Platform” ( Visual Studio!) Web Site: Packages can be on NuGet.org (cloud), or your own (OnPrem) The ecosystem is open source… Microsoft has embraced the community with hooks in Visual Studio!

19 http://Nuget.org Go to http://NuGet.org Navigate to a package.
Open *.nuget package with 7-zip and show the manifest.

20 PowerShell team embraces NuGet
PowerShellGet (Install-Module library) Package Manager (Package-Manager-Manager) AKA “OneGet” Requires WMF 5.0

21 http://PowerShellGallery.com Go to http://PowerShellGallery.com
Note that the web site is similar to NuGet.org Look at Posh-SSH Demo: Install-Module ( -name Posh-ssh ) Get-PackageProvider –listAvailable Find-PackageProvider Get-PackageSource Find-Package –providername PowerShellGet Install-Package

22 Extend NuGet for regular apps?
Copy the Server code from NuGet Copy the Website from NuGet Tweak the NuGet installer to run PowerShell from the Packages Create some PowerShell helper functions And… is born <Yum>

23 Download Chocolatey Toolkit (See website)
The process Download Chocolatey Toolkit (See website) Run: choco.exe install <Package> Download <Package.nuget> Extract contents Call ChocolateyInstall.ps1 ChocolateyInstall.ps1 calls Chocolatey functions to: Download Binaries Install programs Cleanup/Other Maintenance Tasks.

24 http://Chocolatey.org Go to http://Chocolatey.org
Note that the web site is similar to NuGet.org Look at a package like MDT Demo: Install Chocolatey Choco.exe install MDT

25 Chocolatey with OneGet
Choco.exe works for Windows 7 and above. For Windows Management Framework 5.0+ (Win10) Use OneGet. Install packages using OneGet with Chocolatey Provider! Available with Windows Management Framework 5.0 (Win 10) Commands: Find-Package and Install-Package Don’t forget to set ExecutionPolicy – RemoteSigned (minimum) Use –ProviderName ‘Chocolatey’ to force right provider Use –ForceBootStrap –Force –Verbose Demo…

26 PowerShell and Chocolatey!
Demo: Install-Package –Name MDT Install-Package –providerName Chocolatey –Force –ForceBootstrap –Name MDT

27 Creating a Chocolatey Package
PowerShell is what drives Chocolatey Incredible flexibility But… learning curve to get started Steps: Create account on Create a PowerShell script to Install and UnInstall Define a *.XML NuGet style descriptor. Test, Package and Upload to

28 Moderation (a good thing)
Problem: *ANYONE* can post packages to Chocolatey. Solution: Moderation of packages Moderation process: Automated Tests – Static and Dynamic Manual review by designated “Moderators”

29 Working with other package owners Versioning
Packaging Gotchas Working with other package owners Versioning > Use --Version switch in Choco.exe to force version Naming Conventions Language Support OS Dependencies

30 Script – Install-Chocolatey.ps1 for MDT Litetouch
Chocolatey with MDT Script – Install-Chocolatey.ps1 for MDT Litetouch Installs Chocolatey files in \MININT chocolatey-wrapper-for-mdt/

31 The future Chocolatey without PowerShell scripting? Windows Update for Business App-V on Windows Store ( Code Name Centennial ) Chocolatey? How will it evolve

32 Call to action - Q & A Automation is your friend Chocolatey is a great tool and/or resource for automation! Feeling inspired? Contribute! Make your own Chocolatey Packages! Thanks!

33 And Then …


Download ppt "Windows Application Packaging with Chocolatey"

Similar presentations


Ads by Google