free tools for rapidly deploying software

49
Using Free Tools to Rapidly Deploy Software in Your Environment Greg Shields, MVP Partner and Principal Technologist www.ConcentratedTech.com

Upload: concentrated-technology

Post on 24-Apr-2015

8.201 views

Category:

Technology


2 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Free tools for rapidly deploying software

Using Free Tools to Rapidly Deploy Software in Your

Environment

Greg Shields, MVPPartner and Principal Technologist

www.ConcentratedTech.com

Page 2: Free tools for rapidly deploying software

This slide deck was used in one of our many conference presentations. We hope you enjoy it, and invite you to use it

within your own organization however you like.

For more information on our company, including information on private classes and upcoming conference appearances, please

visit our Web site, www.ConcentratedTech.com.

For links to newly-posted decks, follow us on Twitter:@concentrateddon or @concentratdgreg

This work is copyright ©Concentrated Technology, LLC

Page 3: Free tools for rapidly deploying software

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.

Page 4: Free tools for rapidly deploying software

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.

Page 5: Free tools for rapidly deploying software

Part IThe Art of Software Packaging

5

Page 6: Free tools for rapidly deploying software

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

Page 7: Free tools for rapidly deploying software

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.

Page 8: Free tools for rapidly deploying software

Repackaging

• Software installations arrive in one of essentially three formats.• .EXE-based setup files

• Most often today, EXEs actually wrap around an MSI• .MSI-based setup files

• These are slowly becoming the primary mechanism for Windows software installations

• Copy-it-yourself formats

• These are relatively rare these days.

Page 9: Free tools for rapidly deploying software

Repackaging

• Software installations arrive in one of essentially three formats.• .EXE-based setup files

• Most often today, EXEs actually wrap around an MSI• .MSI-based setup files

• These are slowly becoming the primary mechanism for Windows software installations

• Copy-it-yourself formats

• These are relatively rare these days.

• 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

Page 10: Free tools for rapidly deploying software

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.

Page 11: Free tools for rapidly deploying software

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!)

Page 12: Free tools for rapidly deploying software

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.

Page 13: Free tools for rapidly deploying software

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

Page 14: Free tools for rapidly deploying software

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

Page 15: Free tools for rapidly deploying software

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

Page 16: Free tools for rapidly deploying software

DEMOAnalyzing an MSI Installation

16

Page 17: Free tools for rapidly deploying software

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

Page 18: Free tools for rapidly deploying software

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

Page 19: Free tools for rapidly deploying software

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.

Page 20: Free tools for rapidly deploying software

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

Page 21: Free tools for rapidly deploying software

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.

Page 22: Free tools for rapidly deploying software

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.

• It all depends on who wrote the installer…

Page 23: Free tools for rapidly deploying software

DEMOAnalyzing an EXE Installation

23

Page 24: Free tools for rapidly deploying software

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.

Page 25: Free tools for rapidly deploying software

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.

Page 26: Free tools for rapidly deploying software

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 later…

Page 27: Free tools for rapidly deploying software

DEMOAnalyzing a “diff” Installation

Get Your Free Copy of WinINSTALL LE at:http://www.scalable.com/wininstall-le

Page 28: Free tools for rapidly deploying software

Post-Installation Customization

• NEXT STOP: Customizing that app after its installed.

Page 29: Free tools for rapidly deploying software

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.

Page 30: Free tools for rapidly deploying software

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.

Page 31: Free tools for rapidly deploying software

DEMOUsing “diffs” for Configuration Control

31

Page 32: Free tools for rapidly deploying software

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!

Page 33: Free tools for rapidly deploying software

Group Policy Preferences

Page 34: Free tools for rapidly deploying software

Group Policy Preferences

Page 35: Free tools for rapidly deploying software

Group Policy Preferences

• What you need…● Server 2008++ or Vista SP1++ with the Remote Systems

Administration Toolkit (RSAT) as the location for management.● Client Side Extensions (CSE) for clients not at Vista SP1 or

greater / Server 2008 or greater.• CSEs are the client processing components that recognize the use of GPPs.• Get them from your WSUS server.• ALL HAIL MIGHTY WSUS!

● The knowledge, experience, and intestinal fortitude to start really, really working with the registry of your clients from a global perspective.

Page 36: Free tools for rapidly deploying software

DEMOGroup Policy Preferences

36

Page 37: Free tools for rapidly deploying software

Part IIThe Science of Software Deployment

37

Page 38: Free tools for rapidly deploying software

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• PSExec

Free

Not Free

Page 39: Free tools for rapidly deploying software

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.

Page 40: Free tools for rapidly deploying software

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

Page 41: Free tools for rapidly deploying software

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

Page 42: Free tools for rapidly deploying software

DEMOGroup Policy Software Installation

42

Page 43: Free tools for rapidly deploying software

PSExec-based Installation

• Tiny Problem With GPSI: Relies on Group Policy.● Group Policy refresh intervals take time.● Little to no reporting capabilities. Hard to know where it worked

and where it didn’t.● Sometimes you just want to push immediately, without waiting,

and without creating GPOs.

Page 44: Free tools for rapidly deploying software

PSExec-based Installation

• Tiny Problem With GPSI: Relies on Group Policy.● Group Policy refresh intervals take time.● Little to no reporting capabilities. Hard to know where it worked

and where it didn’t.● Sometimes you just want to push immediately, without waiting,

and without creating GPOs.

• PSExec is a remote command execution tool.● Runs commands on remote systems as if they were local.● Clientless● Free component of the PSTools, nice.● Any executable that you would run locally could be run remotely

via PSExec. You just need to encode the executable properly.

• psexec \\computerName cmd

Page 45: Free tools for rapidly deploying software

PSExec-based Installation• Although PSExec was intended for running basic

commands on remote computers, it can be used to invoke the Windows Installer.

• psexec \\computerName “c:\windows\system32\msiexec.exe” /i \\server\packageShare\setup.msi

● Useful for onsey-twosey installs once packages are created.

Page 46: Free tools for rapidly deploying software

DEMOPSExec-based Installation

46

Page 47: Free tools for rapidly deploying software

For Cost Solutions

• Both of these solutions suffer from limitations…● They’re relatively hard to use.● They are not inventory-based.● They have no reporting component.● There is little to no security & workflow associated with

software distribution.

• For Cost Solutions exist that add these necessary features for the not-so-small environment.• Microsoft ConfigMgr, Microsoft SCE, Altiris, Kaseya,

Kace KBOX, others…• Prices range from “wow” to “HOLY WOW”.

Page 48: Free tools for rapidly deploying software

Using Free Tools to Rapidly Deploy Software in Your

Environment

Greg Shields, MVPPartner and Principal Technologist

www.ConcentratedTech.com

Page 49: Free tools for rapidly deploying software

This slide deck was used in one of our many conference presentations. We hope you enjoy it, and invite you to use it

within your own organization however you like.

For more information on our company, including information on private classes and upcoming conference appearances, please

visit our Web site, www.ConcentratedTech.com.

For links to newly-posted decks, follow us on Twitter:@concentrateddon or @concentratdgreg

This work is copyright ©Concentrated Technology, LLC