©2016 rm education 1 · demo –corel draw config self-extracting exe’s some exe files can be...

25
Building large packages on CC4 22/02/2016 ©2016 RM Education 1

Upload: phamlien

Post on 17-May-2019

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ©2016 RM Education 1 · Demo –Corel Draw Config Self-extracting exe’s Some exe files can be extracted and may contain a msi with some logic to install it Use WinZip or similar

Building large packages on CC4 22/02/2016

©2016 RM Education 1

Page 2: ©2016 RM Education 1 · Demo –Corel Draw Config Self-extracting exe’s Some exe files can be extracted and may contain a msi with some logic to install it Use WinZip or similar

Building large packages on CC4 22/02/2016

©2016 RM Education 2

CC4 – Managing large

packages on CC4.

CC4 – Packaging•

Packages

Page 3: ©2016 RM Education 1 · Demo –Corel Draw Config Self-extracting exe’s Some exe files can be extracted and may contain a msi with some logic to install it Use WinZip or similar

Building large packages on CC4 22/02/2016

©2016 RM Education 3

What is a package?Community Connect 4 makes use of Windows Installer Packages to deploy software.

Windows Installer Packages are known as Packages or Products in the RM

Management Console. Other installers can be used including setup.exe, .bat and .cmd

files

Generally speaking, a package is used to install a single piece of software, (although

this could be install several applications, for example Microsoft Office, Adobe Creative

Suite or SIMS).

What is a package?Packages can be configured using the RMMC

- General tab - Name, Desc, version etc

- Contents tab –Name of installer, Transform files, Installation/uninstallation

commands

- Dependencies tab – Dependencies

- Constraints – OS version, HDD/RAM requirements

- Shortcuts tabs – any relevant shortcuts.

- All this information is stored in the CC4 Database as metadata

‘Creating’

Packages on CC4

Page 4: ©2016 RM Education 1 · Demo –Corel Draw Config Self-extracting exe’s Some exe files can be extracted and may contain a msi with some logic to install it Use WinZip or similar

Building large packages on CC4 22/02/2016

©2016 RM Education 4

The way we were….

.

Snapshot Technology - Then

Re-packaging tools

• Needed in the day when software did not come packaged or badly packaged

• Re-packaged software into a Windows Installer package

• Resultant packaged does not contain any logic – it may actually remove it

• Could create ‘dirty’ packages

• Could overwrite newer files when assigned

• Should only be used in the last resort

• ‘Retired’ with the advent of 64bit computers on CC4

Snapshot Technology - now

Page 5: ©2016 RM Education 1 · Demo –Corel Draw Config Self-extracting exe’s Some exe files can be extracted and may contain a msi with some logic to install it Use WinZip or similar

Building large packages on CC4 22/02/2016

©2016 RM Education 5

So how do I re-package?

Managing

Packages on CC4

Getting Started

Understanding your package

• What does it do?

• How does it install?

• What does it install?

• Do I like everything it installs?

• ?????

This is called Application Discovery

Page 6: ©2016 RM Education 1 · Demo –Corel Draw Config Self-extracting exe’s Some exe files can be extracted and may contain a msi with some logic to install it Use WinZip or similar

Building large packages on CC4 22/02/2016

©2016 RM Education 6

Managing Packages – The Basics

Application Discovery

- Understand the Package

- Determine the difficulty level

- Determine the deployment strategy

- Import

- Deploy to station to test

- Allow yourself time!

Managing Packages – The Basics

Understand the Package

- Install it locally on a standalone computer.

- Where does it install to?

- Does it require centralized installation – i.e. large package over 700mb

- Does it require additional files – Shared areas?

- Is license information required?

- Are there any dependency packages?

- Logged on as different users check the basic functionality – does it work?

- File associations and save options

Managing Packages – The Basics cont.

Determine your deployment strategy.

- What switches are needed to install?

- Silent install parameters

- Does the application come with a msi or exe installer?

- Who is the package for? Teachers? Admin Staff? Everyone?

- Does the package make changes to the users profile?

- Does Help functionality work?

- Check file paths, registries, install paths and disk space required.

- Speak to the vendor – any known issues or gotcha’s?

Page 7: ©2016 RM Education 1 · Demo –Corel Draw Config Self-extracting exe’s Some exe files can be extracted and may contain a msi with some logic to install it Use WinZip or similar

Building large packages on CC4 22/02/2016

©2016 RM Education 7

Managing packages – The Basics

- Create 2 clean computers - packagebuild

- One to install the application -One to test the deployment, installation and user

experience

- Install on first computer

- Import your package into the RMMC

- Deploy to your test computer

- Logon as test users – systemadmin\staff\student and test functionality

- Allow time!

So..in an ideal worldPackage timeline

• Package request comes in from staff/SMT/elsewhere

• Install locally to understand/troubleshoot package

• Import package (MSI/EXE) into CC4 using the RMMC

• Deploy to stations

• Test

For most applications this approach should be enough with perhaps some tweaking of permissions to make it run for standard users.

But…what if it doesn’t work?

Page 8: ©2016 RM Education 1 · Demo –Corel Draw Config Self-extracting exe’s Some exe files can be extracted and may contain a msi with some logic to install it Use WinZip or similar

Building large packages on CC4 22/02/2016

©2016 RM Education 8

Common Installers

– MSI’s

Managing packages – common installers

Then

• Previously vendors wrote their own install harness

• This resulted is different behavior between packages

• No common standard

• Made installing and configuring software difficult in an Enterprise environment.

Now

• MSI’s are now the most common method of installing application

• Industry standard installers

• Much more reliable and robust

What is a MSI?

• MSI files are database files, used by Windows Installer.

• Contain information about an application which is divided into features and

components, and every component may hold files, registry data, shortcuts etc.

• Also contains the UI that is to be used for installing, and other data such as any

prerequisites to look for, custom actions to execute, the order of the installation

procedure, whether to support Administrative installations, etc.

• Can also contain the actual files to be installed themselves (this isn't always the

case though, the files can also be in an external CAB file or just as plain

uncompressed files in a location where MSI can find them).

Page 9: ©2016 RM Education 1 · Demo –Corel Draw Config Self-extracting exe’s Some exe files can be extracted and may contain a msi with some logic to install it Use WinZip or similar

Building large packages on CC4 22/02/2016

©2016 RM Education 9

What is a MSI?• Handles rollbacks, uninstalls and versioning much better than previous solutions

• Consistent installation experience

• Reliable

• Can perform software installs by proxy for unprivileged users

• Can configure at first use

• Installation on demand – features can be installed on access by users.

• Can contain custom actions configured by the vendor

Working with MSI files

Getting to know your installer

- Where does it install to?

- Do I need special permissions to run this?

- Do I need to modify the standard install? If so, why!?

- Will it run for all users

- Does it need additional files? – shared areas

- Does it install quietly - Msiexec /i “C:\Temp\MyPackage.msi” /qn+

Creating a Package.ini file

- Optional step

- Used to define package detail

- TEC21751 has full details on package.ini creation

- Compulsory Entries – OS,WIPackage,

- Optional Entries – WITransform, Logging, MsiUILevel, Add Command, uninstall

command.

Page 10: ©2016 RM Education 1 · Demo –Corel Draw Config Self-extracting exe’s Some exe files can be extracted and may contain a msi with some logic to install it Use WinZip or similar

Building large packages on CC4 22/02/2016

©2016 RM Education 10

List of applicable OS’s – TEC3809017

Example Package.ini

Working with MSI Files –Importing to CC4

• The RMMC will import the MSI file and all files and folders alongside it, so make sure theMSI is in a folder that only contains the required files

• You cannot import directly from a CD as the RMMC writes to the folder the package is in. Instead copy the contents of the CD to a temp location and import from there.

• You can add details to your package before importing by adding a package.ini

• Shortcuts – a word of warning - Be wary that you only add the shortcut to the application in the RMMC – there is no check when you “Add” shortcuts to the list, and if you add the package EXE by mistake this will break the assignment of the package to your computers.

• If you add the package EXE as a shortcut in error, then this may be large and can break the job in MSMQ (as MSMQ has a maximum size of 4MB for any job added to it).

Page 11: ©2016 RM Education 1 · Demo –Corel Draw Config Self-extracting exe’s Some exe files can be extracted and may contain a msi with some logic to install it Use WinZip or similar

Building large packages on CC4 22/02/2016

©2016 RM Education 11

Troubleshooting MSIexec - Logging

Msiexec /i “C:\Temp\MyPackage.msi” /l*v c:\msilog.txt - Search log for Return

Value 3

Voicewarmup – HKLM\Software\Policies\Microsoft\Windows\Installer

- Outputs to the temp directory %temp%

- File begins with “Msi” and ends with a .log extension

- Search for “return value 3”

Demo – WILogUtil.exe

Troubleshooting MSIexec

Use Orca.exe to determine what is failing – custom actions etc.

Event Logs

Contact the vendor – they are the experts!

Page 12: ©2016 RM Education 1 · Demo –Corel Draw Config Self-extracting exe’s Some exe files can be extracted and may contain a msi with some logic to install it Use WinZip or similar

Building large packages on CC4 22/02/2016

©2016 RM Education 12

Demo – using Orca to

understand your package

Common Installers

– EXE’s

What is an exe?

Page 13: ©2016 RM Education 1 · Demo –Corel Draw Config Self-extracting exe’s Some exe files can be extracted and may contain a msi with some logic to install it Use WinZip or similar

Building large packages on CC4 22/02/2016

©2016 RM Education 13

Working with exe files.

Working with exe files.

Demo – setup.exe install

switches

Page 14: ©2016 RM Education 1 · Demo –Corel Draw Config Self-extracting exe’s Some exe files can be extracted and may contain a msi with some logic to install it Use WinZip or similar

Building large packages on CC4 22/02/2016

©2016 RM Education 14

Package.ini files

Changing installer

files - EXE

A word of warning….

Page 15: ©2016 RM Education 1 · Demo –Corel Draw Config Self-extracting exe’s Some exe files can be extracted and may contain a msi with some logic to install it Use WinZip or similar

Building large packages on CC4 22/02/2016

©2016 RM Education 15

Can I edit an exe?

Vendors build logic into exe files

It is not recommended that you edit these

If edited they can become unstable

Some are self extracting – use winzip or similar to interrogate the exe if applicable

Always contact the vendor for advice before editing exe installers

As a rule always try to avoid editing exe files

Demo – Corel Draw

Config

Self-extracting exe’s

Some exe files can be extracted and may contain a msi with some logic to install it

Use WinZip or similar to extract the contents and analyse these

If your exe does not extract using de-compressors try running it manually and before

the final install button look in %temp% to see if it has extracted there.

Page 16: ©2016 RM Education 1 · Demo –Corel Draw Config Self-extracting exe’s Some exe files can be extracted and may contain a msi with some logic to install it Use WinZip or similar

Building large packages on CC4 22/02/2016

©2016 RM Education 16

Demo – Self Extracting

EXE – Intel Proset

Speak to your vendor

Changing installer

files – MSI’s

Page 17: ©2016 RM Education 1 · Demo –Corel Draw Config Self-extracting exe’s Some exe files can be extracted and may contain a msi with some logic to install it Use WinZip or similar

Building large packages on CC4 22/02/2016

©2016 RM Education 17

Editing a msi file

So, editing an exe may be difficult but

editing a msi can be done…so should

I edit a vendor supplied msi?

We don’t change any vendor supplied packages. We suggest you don’t either….

Editing a msi fileMost msi files work fine in themselves but there may be time you want to add items like:

Serial Numbers

Proxy Settings

Shortcuts

Removing components – toolbars etc

There are three main ways of changing a msi:

• Set public properties or command lines

• Create a mst file

• Directly edit the msi using packaging tools.

Page 18: ©2016 RM Education 1 · Demo –Corel Draw Config Self-extracting exe’s Some exe files can be extracted and may contain a msi with some logic to install it Use WinZip or similar

Building large packages on CC4 22/02/2016

©2016 RM Education 18

Editing MSI Properties

There are 2 types of properties in MSI files

Public – (UPPER CASE CHARACTERS) can be set as command line in a msi

installation

Private – (lower case characters) Can only be edited using a MST file or editing the

msi with a editing tool like:

Editing Public Properties

Public – (UPPER CASE CHARACTERS) can be set as command line in a msiinstallation.

This can be done using a package.ini

Use msiexec /? to determine command line options:

http://www.advancedinstaller.com/user-guide/msiexec.html

Or….. speak to your vendor…they know what has been set

Use orca.exe or similar to look at the package properties

Add command lines to the ini to edit the property and then import the package

Edit directly in the RMMC if the property is available therein

Demo – Using Orca to

examine a MSI

Page 19: ©2016 RM Education 1 · Demo –Corel Draw Config Self-extracting exe’s Some exe files can be extracted and may contain a msi with some logic to install it Use WinZip or similar

Building large packages on CC4 22/02/2016

©2016 RM Education 19

Editing Public Properties

Editing Private Properties

Private – (lower case characters) Can only be edited using a MST file or editing the

msi with a editing tool like:

InstEdit

Orca.exe

Transform files - MST

Page 20: ©2016 RM Education 1 · Demo –Corel Draw Config Self-extracting exe’s Some exe files can be extracted and may contain a msi with some logic to install it Use WinZip or similar

Building large packages on CC4 22/02/2016

©2016 RM Education 20

Demo – Creating a

Transform file

Adding the transform

Using Editing tools

Page 21: ©2016 RM Education 1 · Demo –Corel Draw Config Self-extracting exe’s Some exe files can be extracted and may contain a msi with some logic to install it Use WinZip or similar

Building large packages on CC4 22/02/2016

©2016 RM Education 21

Warning Editing an MSI file can cause serious problems that may leave your system in an unstable state. Microsoft cannot guarantee that problems resulting from the incorrect use of the MSI file editor can be solved. Modifications of the MSI file of a shipping product should only be attempted under direct instruction from the product's vendor

Speak to your vendor

Capturing an

application

Page 22: ©2016 RM Education 1 · Demo –Corel Draw Config Self-extracting exe’s Some exe files can be extracted and may contain a msi with some logic to install it Use WinZip or similar

Building large packages on CC4 22/02/2016

©2016 RM Education 22

Snapshot technology today….

Creating a package

Creating a package

Page 23: ©2016 RM Education 1 · Demo –Corel Draw Config Self-extracting exe’s Some exe files can be extracted and may contain a msi with some logic to install it Use WinZip or similar

Building large packages on CC4 22/02/2016

©2016 RM Education 23

Managing

permissions.

User permissions

Index Article

Page 24: ©2016 RM Education 1 · Demo –Corel Draw Config Self-extracting exe’s Some exe files can be extracted and may contain a msi with some logic to install it Use WinZip or similar

Building large packages on CC4 22/02/2016

©2016 RM Education 24

What’s next?

The future of packaging and apps…

Windows 10 promises easier deployment of modern and traditional apps through

command line installs – e.g. chocolatey, Powershell, Windows 10 ‘OneGet’ built in

commands but no real news on enterprise deployment of apps.

Remote apps hosting – ‘Package once’ apps that can be deployed from the cloud to

any on premise or offsite devices, to any kind of devices… watch this space….

Summary

Page 25: ©2016 RM Education 1 · Demo –Corel Draw Config Self-extracting exe’s Some exe files can be extracted and may contain a msi with some logic to install it Use WinZip or similar

Building large packages on CC4 22/02/2016

©2016 RM Education 25

Today’s session.

So, today we have looked at:

Q & A’s