TechMentor Fall, 2011 - Packaging Software for Automated Deployment with Windows 7

  • 773 views
Uploaded on

Whether you’ve attended Greg’s earlier sessions or not, you probably recognize the value in automating application installs. The trick is in getting those installs to do their work silently, without …

Whether you’ve attended Greg’s earlier sessions or not, you probably recognize the value in automating application installs. The trick is in getting those installs to do their work silently, without prompting for questions. The hard part, indeed the art, is in that packaging of software. Microsoft MVP Greg Shields has been packaging and deploying software for nearly a decade. In this do-not-miss session, he’ll share his secret tricks in getting the job done. And tricks they are! Whether you’re deploying software through Group Policy, System Center Configuration Manager, a Windows deployment solution, or any of the third party options out there, this session contains the knowledge you’ll need for them all. Don’t miss this one. What you learn might just be the most powerful thing you discover all week at TechMentor.

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
773
On Slideshare
0
From Embeds
0
Number of Embeds
2

Actions

Shares
Downloads
119
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide
  • TechMentor Las Vegas 2011
  • Greg Shields
  • Greg Shields
  • Greg Shields
  • Windows Connections Updates will be available at http://www.devconnections.com/updates/Orlando_Spring09/Windows
  • Greg Shields
  • Greg Shields
  • Greg Shields
  • Greg Shields
  • Greg Shields
  • TechMentor Las Vegas 2011

Transcript

  • 1. Windows 7 Deployment Deep Dive Packaging Software for Automated Deployment Greg Shields, MVP, vExpert Concentrated Technology www.ConcentratedTech.com
  • 2. Agenda
    • Topics
      • Part I: The Art of Software Packaging
      • Part II: The Science of Software Deployment
    Many IT Professionals have problems with automated software distribution because it feels like a complicated topic. But there are really two halves: Software Packaging … and… Software Deployment In this session, you’ll learn the nuances of both.
  • 3. Automated Software Deployment
    • There are two halves to rapidly and remotely installing applications:
      • Repackaging – A software installation must first be reconfigured to install without prompting the user or requiring additional information.
      • Deployment – The repackaged software installation is then loaded into a deployment tool and scheduled for deployment.
  • 4. Part I The Art of Software Packaging
  • 5. Repackaging
    • Consider the typical installation…
      • Insert the CD/DVD media
      • Double-click setup.exe or setup.msi
      • Next…Next…Finish…
      • Head to the next desktop
  • 6. Repackaging
    • Consider the typical installation…
      • Insert the CD/DVD media
      • Double-click setup.exe or setup.msi
      • Next…Next…Finish…
      • Head to the next desktop
    • In order to deploy the same software automatically and remotely, you must…
      • Figure out how to complete the software installation without requiring input by the user.
      • Figure out how to execute the reconfigured setup.exe or setup.msi file locally on designated desktops.
  • 7. Repackaging
    • Software installations arrive in one of essentially three formats.
      • .EXE-based setup files
      • .MSI-based setup files
      • Copy-it-yourself formats
  • 8. Repackaging
    • Software installations arrive in one of essentially three formats.
      • .EXE-based setup files
      • .MSI-based setup files
      • Copy-it-yourself formats
    • Of the first two above, virtually all are packaged using one of the major packaging utilities:
      • Wise Package Studio
      • InstallShield
      • Inno Setup
      • Nullsoft Scriptable Install System
  • 9. Repackaging
    • Each format and packager has its own characteristics and switches.
      • Adobe Acrobat: AcroRd32.exe /s /v/qn
      • Installation switches define the “hidden” parameters that can be used to install the package.
      • Silent switches instruct the package to install without prompting for input.
      • Some have neither. Some have nothing.
  • 10. Repackaging
    • Each format and packager has its own characteristics and switches.
      • Adobe Acrobat: AcroRd32.exe /s /v/qn
      • Installation switches define the “hidden” parameters that can be used to install the package.
      • Silent switches instruct the package to install without prompting for input.
      • Some have neither. Some have nothing.
    • Thus, while every software installation is different, they are in many ways the same.
      • You need to sleuth out if switches exist and what they are!
      • Or…(More on that in a minute!)
  • 11. Repackaging – MSI’s
    • MSI installation uses the native Microsoft Installer
      • Microsoft Installer is the framework built into Windows.
      • Like Microsoft Update, but for installing software.
      • “ Silent” switches are common across all installations.
  • 12. Repackaging – MSI’s
    • MSI installation uses the native Microsoft Installer
      • Microsoft Installer is the framework built into Windows.
      • Like Microsoft Update, but for installing software.
      • “ Silent” switches are common across all installations.
    • Packaging tools automatically interrogate the MSI database to determine silent switches & customizations.
    • Customization and silencing is done at command-line.
      • msiexec /i /qb- AppA.msi DESKTOP_SHORTCUTS=0
      • msiexec /i AppB.msi TRANSFORMS=custom.mst
  • 13. MSI Examples
    • The standard command syntax for any MSI is…
      • msiexec.exe – Invokes the installer, and then…
        • /i – Install
        • /a – administrative install
        • /l* – Log all information
        • /q – No user interface
        • /qb- – Basic user interface with no dialog boxes
        • PROPERTYNAME = PropertyValue
      • msiexec /qb- /l* logfile.txt /i setup.msi NAME=Value
  • 14. MSI Examples
    • The standard command syntax for any MSI is…
      • msiexec.exe – Invokes the installer, and then…
        • /i – Install
        • /a – administrative install
        • /l* – Log all information
        • /q – No user interface
        • /qb- – Basic user interface with no dialog boxes
        • PROPERTYNAME = PropertyValue
      • msiexec /qb- /l* logfile.txt /i setup.msi NAME=Value
    • (Non-functioning) Example
      • msiexec /qb- /l* logfile.txt /i AcroRd32.msi SERIALNUMBER=59a83b987c REBOOT=SUPRESS
  • 15. DEMO Analyzing an MSI Installation
  • 16. Repackaging – EXE’s
    • EXE files have no common switch schema.
      • There’s no central authority that governs EXE switches.
      • Depending on the packager used to create the EXE, there are some known tricks.
    • Finding the correct “silent switches” is key to installing properly. And they can be anything !
      • AppA.exe /s /v/qn
      • AppB.exe /quiet /norestart
      • AppC.exe /go /blowyournose
      • AppD.exe /take /mywife:please
    Don’t reinvent the wheel. Reference the Intertubes for applications and their silent switches. www.AppDeploy.com
  • 17. EXE Examples
    • InstallShield (Ol’ school)
      • Run the installer with the /r switch on a reference machine
      • Proceed through the dialogs, answering prompts as you would on the client machine
      • Complete the installation
      • The installation will create a setup.iss file in %windows%
      • Use this file to run the installation
      • setup.exe /s /f1setup.iss [/f2logfile.txt]
    • InstallShield (Nu’ school, with Wrapped MSI)
      • Setup.exe /s /v/qb
      • Characters after /v are passed to the wrapped MSI file.
    • Wise Package Studio, Others…
      • setup.exe /s
  • 18. EXE Examples
    • Also Try…
      • /a
      • /q:a /r:n
      • /silent
      • /passive
      • /quiet
      • /norestart
      • /?
      • /help
    • /? and /help sometimes pop up a dialog box that contains useful clues.
  • 19. EXE Examples
    • Many EXEs these days are actually MSI wrappers
      • This means the EXE does little more than launch an MSI installation
      • fileName /s /v/qn – Anything after the /v is passed to the wrapped MSI file
  • 20. EXE Examples
    • Many EXEs these days are actually MSI wrappers
      • This means the EXE does little more than launch an MSI installation
      • fileName /s /v/qn – Anything after the /v is passed to the wrapped MSI file
    • Trick #1: Use the /a switch to perform an “administrative install”, which sometimes will unpack that MSI.
  • 21. EXE Examples
    • Many EXEs these days are actually MSI wrappers
      • This means the EXE does little more than launch an MSI installation
      • fileName /s /v/qn – Anything after the /v is passed to the wrapped MSI file
    • Trick #1: Use the /a switch to perform an “administrative install”, which sometimes will unpack that MSI.
    • Trick #2: Start the EXE installation, but don’t finish it!
      • Double-click the EXE.
      • Wait for it to unpack.
      • When the first prompt appears, check %temp% for unpacked MSI install files.
  • 22. DEMO Analyzing an EXE Installation
  • 23. Repackaging – Diff’s
    • Some software is exceedingly complicated, doesn’t include “silent switches”, or simply won’t install with the other two mechanisms.
      • For these, we run a “diff”, yo.
  • 24. Repackaging – Diff’s
    • Some software is exceedingly complicated, doesn’t include “silent switches”, or simply won’t install with the other two mechanisms.
      • For these, we run a “diff”, yo.
    • The process to do this…
      • Build a barebones desktop of the same OS/SP. Virtual machines make this easy.
      • Snapshot its initial configuration.
      • Install and configure the application.
      • Re-Snapshot again.
      • Run the packager’s “diff” tool to log and subsequently package the file/driver/registry changes.
    • In some cases this can be easier than an EXE install.
  • 25. Repackaging – Diff’s
    • SLIGHT PROBLEM: Most packagers that can do this are expensive, natch.
      • Caphyon Advanced Installer
      • WinINSTALL MSI Packager
      • Wise for Windows Installer
      • EMCO MSI Package Builder
      • Acresso AdminStudio
      • Acresso InstallShield
    • But there are some freeware alternatives…
      • Some of the above’s “free” versions
      • AppDeploy Repackager
      • SMSInstaller
      • WinINSTALL LE
    We’ll use WinINSTALL LE in a sec…
  • 26. DEMO Analyzing a “diff” Installation Get Your Free Copy of WinINSTALL LE at: http://www.scalable.com/wininstall-le
  • 27. Post-Installation Customization
    • NEXT STOP: Customizing that app after its installed.
  • 28. Post-Installation Customization
    • NEXT STOP: Customizing that app after its installed.
    • For nearly all Windows applications, customization is stored in the registry.
      • Whole-machine customization in HKLM.
      • Per-user customization in HKCU.
    • The easiest way to determine post-installation customization is using that same “diff” packager tool.
      • Snapshot after installation
      • Make a configuration change
      • Re-snapshot
      • Package registry change
      • Distribute the registry change.
  • 29. Post-Installation Customization
    • HKLM is easy to manipulate.
      • Settings are per-machine.
    • HKCU can be a little more difficult.
      • User must be logged in for HKCU hive to be loaded.
    • This process gets waaaaaay easier with Group Policy Preferences.
      • Are you seriously not using them yet?
      • With GPPs, creating custom registry changes is crazy easy.
  • 30. DEMO Using “diffs” for Configuration Control
  • 31. Group Policy Preferences
    • Applications and Windows itself store its configurations either in the registry or in files.
    • What then we need is…
      • A toolset that allows admins to easily input custom configurations without requiring coding.
      • Environment variables, files, folders, INI files, registry settings, network shares, shortcuts.
      • Data sources, devices, folder options, local users and groups, network options, power options, printers, scheduled tasks, services.
    • Solution: GPPs!
  • 32. DEMO Group Policy Preferences
  • 33. Part II The Science of Software Deployment
  • 34. From Package to Software
    • Now that you’ve got a software package, you need to get it deployed to machines.
    • Multiple software deployment solutions exist, with various price points…
      • Microsoft ConfigMgr
      • Microsoft SCE
      • Altiris
      • Kaseya
      • Kace KBOX
      • Active Directory
      • MDT
    Free  Not Free 
  • 35. One Way: GP Software Installation
    • Group Policy Software Installation (GPSI) is free and has already bromanced your Active Directory
      • Generally limited to MSI installations.
        • Although ZAP files allow EXE installations.
      • Careful: Deleting a GP in the wrong way can automatically uninstall software everywhere.
      • GPs have no reporting component. No way to know where failures have occurred.
    • … but, it is free.
  • 36. One Way: GP Software Installation
    • Four Steps to installing software via GPSI:
      • Obtain a “silenced” MSI installation package
      • Create a software distribution shared folder
      • Create a GPO
      • Assign or Publish the software
  • 37. One Way: GP Software Installation
    • Four Steps to installing software via GPSI:
      • Obtain a “silenced” MSI installation package
      • Create a software distribution shared folder
      • Create a GPO
      • Assign or Publish the software
    • Assignment vs. Publishing
      • When a package is Assigned , the software isn’t downloaded and installed until its initial use.
        • The user must click its icon to start the process.
        • Eliminates software that users don’t use, but increases the time to start on first use.
      • When a package is Published , it appears in Add/Remove Programs.
        • The user must choose to “Install a program from the network”
        • You cannot Publish to Computer objects
  • 38. Another Way: Task Sequences in Microsoft Deployment Toolkit
    • MDT includes multiple ways to inject applications directly into installed OS images.
      • Select them at deployment time.
      • Add them into a Task Sequence.
    • Deploying apps via MDT starts with repackaging…
  • 39. Another Way: Task Sequences in Microsoft Deployment Toolkit
    • Applications without source files is used for deploying prepackaged applications.
    • Application bundles link packages together.
  • 40. Injecting Apps During MDT Installation
    • Create new applications in MDT.
  • 41. Injecting Apps During MDT Installation
    • Once added, applications can be selected during the installation.
  • 42. Injecting Apps During MDT Installation
      • Alternatively, app installs can be added to a Task Sequence.
      • Adding there eliminates the questions during install.
  • 43. Windows 7 Deployment Deep Dive Packaging Software for Automated Deployment Greg Shields, MVP, vExpert Concentrated Technology www.ConcentratedTech.com