Week 3 - Software Distribution Flashcards
What are executable files?
.exe files contain instructions for the computer to run once executed
What does PE mean?
Portable executable
(Microsoft’s special implementation of EXE)
What does MSI files stand for?
Microsoft Install Package
What do MSI files do?
MSI files guide the Windows Installer in the installation, maintenance, and removal of a program
What are 2 ways an .exe file is used?
- starting point to bootstrap Windows installer
- contain all instructions needed to be used as a custom installer (no MSI file or Windows Installer used)
What are the differences in using an MSI file/Windows Installer and a custom installer for an executable program?
Customer installer = more control over Window’s actions when installing
MSI file/W Installer = Simpler setup, most taken care of for you, but only able to install it a certain way
What are 2 ways to install an .exe from the command line? Both
- change into the directory with the file
- type in its name
or
- type in the absolute path from wherever you are in the file system
How do you see sub-commands a package might have?
/?
In Windows, what is software usually packaged as?
an .exe file
What 4 types of things does the MSI file installation package contain?
- installation database
- summary info
- data streams for each part of the installation
- maybe internal/external source files needed for installation
What are the 7 commands for self-extracting executables?
- /extract:[path] extracts the content of package to the path folder. If no path provided, Browse box appears
- /log:[path to log file] enables verbose logging (more detailed info recorded in log file) for the update installation
- /lang:lcid sets user interface to specified locale when multiple locales are in the package
- /quiet runs package in silent mode
- /passive runs update without any interaction from user
- /norestart prevents prompting user when a restart is needed
- /forcerestart forces a restart of the computer as soon as the update is finished
What is MakeAppx.exe?
a program/tool that:
1. creates an app package from files on a disk
2. extracts files from an app package to a disk
What is the Microsoft store? How is software installed through here updated?
contains apps and programs that are curated for content and certified for compatibility
software installed through here are updated automatically
What’s the file extension for a portable executable file (PE)?
.exe
What’s the software package used for Linux?
.RPM
What does .RPM stand for?
. (Red Hat Manager)
What software distribution type does Ubuntu use?
.deb (Debian)
How to install a debian package?
sudo dpkg -i filepath
-i for install
How to remove a program from Ubuntu?
sudo dpkg -r programname
How to list debian packages installed on machine
dpkg -l
- -l for list
Search for a program you installed ubuntu? 2 ways
dpkg -l | grep packagename
or
dpkg -s packagename
How do you define an app store?
a central managed marketplace where app developers publish and sell mobile apps
between an app store app and app store service, which is the repository and which is the package manager?
app store app is the package manager
app store service is the respository
Mobile OS only trusts code for an app that’s been ____? By who?
signed by a publisher/developer it recognizes
What happens if someone changes the code to an app? What does the OS know about it?
it becomes invalid, OS knows it’s tampered
What allows an organization to distribute custom mobile apps?
enterprise app management
how are enterprise apps signed?
with an enterprise certificate that needs to be trusted by the devices installing it
what does MDM stand for? What is it?
Mobile Device Management
what an IT support specialist would use to help manage enterprise app installation
What is side-loading?
you install apps directly without using a mobile app store
How do you reset a mobile app to how it was when it was first installed?
delete or clear the cache
(each app has its own storage location/cache)
What is an archive? w
An archive is multiple files that are compressed (unless .tar) and combined into a single file
What is a package archive? w
A package archive are all the core software files compressed into a single file
What is ‘installing from source’ referring to? windows. Installing what?
When installing software from a source archive
What’s an example of an archive type?
.zip
.rar
.tar
What is 7 Zip?
Windows and Linux tool that can extract/un-extract (archiving/un-archiving) compressed files
Command to compress files Windows
Compress-Archive -Path C:\Users\cindy\Desktop\CoolFiles\ ~\Desktop\CoolArchive.zip
Extract file using 7 Zip
7z e filepath
- she said to use e as a flag but there’s no -e
To create an archive with 7zip
linux
7z a archivename.7z filetoarchive
To see a list of files in a 7z archive
l
7z l archivename.7z
To compress all files in directory using 7zip
l
7z a test *
How to compress certain files in a directory with 7zip
l
7z a my_archive2.zip file1 file2
What is an archive?
a single file that contains any number of individual files and information on how to restore them to their original form by an extraction program
What are archives useful for?
archives are useful for distributing package/program files, transmitting data, and storing files
What are archives created with tar called?
tarballs
Does tar compress files?
No
Unlike many commands, tar requires the use of at least one ____?
option
What options are used to create tar files?
-c and -f
the -f must always be the final option
Is the .tar extension necessary?
No but it’s helpful to label the tar files to organize them and know what they are
For .tar files, what option MUST be the final option to prevent system confusion?
-f
(it tells the system what the file name will be and it gets confused if it’s behind other options)
What steps should be taken before unpacking tar files onto a computer?
- Make sure that there’s enough space on the HDD
- Make sure you’re in an empty directory to avoid extracted files from overwriting files
- If the file was compressed, you must decompress it with a decompression program
What does having dependencies mean?
It refers to software that relies on other software to run
What’s a library?
A packaged bundle of useful code written by someone else
What’s a DLL? Accessed by who?
Dynamic Link Library
code that is accessed and shared by programs that support their function
What handles managing dependencies and their availability to a program?
How does Windows avoid DLL hell now?
By using SXS
What is SXS? What do they do?
Side by side assemblies, it manages shared libraries/resources
SXS system and installer bundle dependencies together in installation packages
What does a manifest do?
When an application requests access to a shared library it’s added to the manifest
___ supports access to multiple versions of the same ___ ___ automatically
SXS supports access to multiple versions of the same shared library automatically
What can you use to help you install and maintain the libraries and other dependencies that your installed software needs to use?
a Windows Package Manager
How to locate software and its dependencies?
Find-Package packagename -IncludeDependencies
What is a commandlet?
a command that has a verb-noun format
(Select-String, Get-Help, Find-Package)
What’s a sys internals package?
w
it is a set of troubleshooting tools provided by Windows
What’s the place called where all kinds of Windows software packages live?
chocolatey
How to locate software and its dependencies?
w
Find-Package packagename -IncludeDependencies
How to add a package source
w
4 things
Register-PackageSource -Name chocolatey -ProviderName chocolatey -Location http://chocolatey.org/api/v2
How to Verify Package Source?
w
Get-PackageSource
Install a Package
w
Install-Package packagename
What are some common DLLs used by Windows? 3
- .drv files - device drivers (printers, etc)
- .ocx files - Active X program object selections like selecting calendar date
- .cpl files - control panel files manage control panel functions
What are 4 ways a DLL dependencies can be broken?
- Overwriting DLL - app overwrites, another app fails
- Deleting DLL files - malware or apps delete files
- Upgrading/Fixes to DLLs - DLL Hell. New version DLL but another app isn’t compatible with new version DLL yet.
- Rollback Previous DLL versions - installing old app rewrites newer version DLL with older version
What are 3 ways Windows has remedied DLL issues?
- Windows File Protection - Windows controls DLL updates/deletion (only apps with valid signatures)
- Private DLLs - copy of DLL stored in apps root folder, changes to shared version do not affect private copy
- .Net Framework assembly versioning - allows app to add updated DLL version without removing older DLL version
Where can DLL versions be found?
C:\Windows\assembly
and placed in the GAC
What is GAC? What does it contain?
Windows
Global Assembly Cache
contains the “Strong Name Assembly “ of each DLL version
What 4 items does “Strong Name Assembly” in the GAC include?
- name of the assembly (multiple DLL files can share assembly name)
- version number
- culture - country or region where app is deployed
- public key token - 16 character key assigned when built
DLLs and dependencies can also be found in _____?
side by side assemblies
What is a side by side assembly?
public/private resource collection available to running apps that contain XML files (manifests)
What are side by side assembly manifests? what type of files are they?
They’re XML files that contain configuration settings stored in the WinSxS folder instead of the traditional Windows registry.
(typically a group of several DLLs and resources deployed together and made available for applications)
Where are private manifests stored?
inside application’s folder or embedded in an application or assembly
(They typically contain info about where resources are stored, settings for loading those resources, etc.)
What 4 things does the metadata of a manifest include?
- Names
- Resource collections (DLLs, COM servers, Windows classes, interfaces, type libraries)
- Classes - included if versioning is used
- Dependencies - can create dependencies to other side-by-side assemblies
Does dpkg install package dependencies for us?
No, Package Managers help us install package dependencies (will show up with an error when trying to install a package)
- Dependencies can be other packages or other shared libraries
What is Debian?
One of many free Linux OS
What are 6 things that Linux packages contain?
- binary executables
- software libraries
- configuration files
- package dependencies
- command line utilities
- and/or apps with a GUI
What are 3 common Linux Package types?
- tgz - TAR gzip
- .rpm - Redhat packages
- .deb - Debian packages
What is a Linux respository?
storage space on a server that hosts thousands of Linux packages
What lists the external dependencies needed by the package?
Package manifests
What are 3 package managers for Debian-based systems?
- dpkg
- APT (Advanced Package Tool) uses dpkg commands, installs package dependencies required
- aptitude - user friendly PM
What are 3 package managers for RedHat-based systems like CentOS?
- rpm
- yum - yellowdog updater modified (comes with redhat)
- dnf - dandified Yum
Windows: 2 ways to check options for installing packages from CLI?
- /? for any useful information into what options installer provides
- check documentation for the app to see what options it provides
What is chocolatey?
3rd party package manager for Windows (public repository)
Uninstalling a package Windows?
Uninstall-Package -Name packagename
What is NuGet?
a package manager primarily used for software written using .NET framework
(also evolved to include other tools/services like open-source client app, hosted package servers, and software deployment tools)
What does a NuGet package file look like? What does it contain?
Single zip file that bears a .nupack or .nupkg file extension
contains .NET assemblies and manifest file describing contents
How to install a package with apt?
Linux (apt is for Ubuntu)
sudo apt install packagename
Remove a package with apt
sudo apt remove packagename
What is a package repository?
server that acts as central storage location for packages
Where is the respository source file in Ubuntu?
/etc/apt/sources.list
add package/repository links to this file so the computer knows where to check for software
What are PPAs?
L
personal package archives
special repositories hosted on launchpad servers but not as secure and can contain malicious code
How do you update and upgrade packages? Linux
sudo apt update
sudo apt upgrade
How to learn more about the commands available with apt?
apt - -help
what does apt stand for?
advanced package tool
What are closed-source packages?
Windows
We’re not able to view the source code for a package so we can’t see what the program is doing
What are 6 things MSI files contain?
- installation instructions in different tables
- files
- objects
- shortcuts
- resources
- libraries
program will need all grouped together
How does the Windows Installer let users uninstall a program later?
It keeps track of its actions and creates a separate set of instructions to undo the installation
What does a process monitoring program do? Who is it provided by?
W
Provided by MS sysinternals toolkit, it sees the actions an installer is taking (even when it’s a closed source package)
What is orca.exe?
Orca.exe is a database table editor for creating and editing Windows Installer packages and merge modules.
In what format does Microsoft package their apps/programs released in the Windows store?
APPX
What is a package?
A compressed software archive file that contains the files needed for a software application.
Linux OS installations normally come with thousands of packages. Common Linux package types include these 3:
- Debian packages .deb
- Red Hat Manager packages .RPM
- TAR archive .tgz
What is a standalone package?
Doesn’t require any dependencies to function/install
Do packages contain the dependencies needed to install software they contain? L
No
How do we know which dependencies are needed to install software if they’re not included? L
External dependencies are listed in the package’s manifests
______ can read package manifests to determine if any dependencies are needed
Package Managers, then the PM finds and installs dependencies needed before the software
Like we added chocolatey as a package manager source in Windows, how do we add a source to Linux?
/etc/apt/sources.list
package and repository links are added here
___ makes sure that the process of software installation, removal, update and dependency management is as easy and automatic as possible
a package manager
What format is used by the Windows Store to distribute universal Windows platform apps?
appx packages
How do you install a software package named “boo” on Ubuntu?
apt-get install boo
To troubleshoot mobile apps, what will remove changes to the settings and sign out of any accounts the app was signed into?
clearing the cache
How do you verify that a software package was installed on PS?
Get-Package -Name TestPackage
In Ubuntu, what kind of device might create a file called /dev/sdc?
a memory stick
When Windows sees a new device is connected, what does it do first?
Ask for the device’s hardware ID
Which command will show you what Linux kernel version you have?
uname -r
PS: How do you install a package called “TestPackage”?
Install-Package -Name TestPackage
What hardware devices appear as a character device in your Ubuntu /dev directory?
- keyboard
- mouse
What command will update your Linux application sources?
sudo apt update
What is the repository source file in Ubuntu?
/etc/APT/sources.list
What actions may update your Linux device drivers?
- Installing a kernel module
- Updating the Linux kernel
How do you install a new version of the Linux Kernel?
sudo apt full-upgrade