2026-07-17 16:22

Status:


OS&Y Module 3 - Package and Software Management

==Software Distribution

  • Windows - Software Packages
    • Packaging is basically just packages of software that are bundled up by their creators to make them far easier to install

    • In windows, software is generally packaged as a .exe file, or an executable file

    • Executable File (. exe)- Contains instructions for a computer to execute whenever they are running

    • Executable files are not exclusive to windows but they are special because of Window’s Portable Executable Format

    • An executable file might include not only instructions, but also things like images, code, or an .msi file

    • Microsoft install package (. msi)- used to guide a program called the Windows Installer in the installation, maintenance, and removal of programs on the Windows Operating System

    • An executable file is basically just a bootstrap in order to get the Windows installer working, which also sets up a way for the user to uninstall the software

    • Although, they can also be custom installers, and not really depend on the Windows Installer

    • If you want to install applications in the CLI for windows, then you might do so through a tool like wget, or you might go into a directory with an executable and run it from there, you basically just type in it’s name and it runs

    • You can also get flags for the command line, have things basically run without popping up something, or running and restarting at the end

  • Supplemental Reading for Windows Software Packages
    • The packages include a .msi file (Microsoft install file) which contains an installation database, summary information, and data streams for each part of the installation.

    • The msi file might also include internal source files, and external ones needed for installation as well, probably like .dll files

      • /extract:[path]: Extracts the content of the package to the path folder. If a path isn’t specified, then a Browse dialog box appears.
    • /log:[path to log file]: Enables verbose logging (more detailed information recorded in the log file) for the update installation.

    • /lang:lcid: Sets the user interface to the specified locale when multiple locales are available in the package.

    • /quiet: Runs the package in silent mode.

    • /passive: Runs the update without any interaction from the user.

    • /norestart: Prevents prompting of the user when a restart of the computer is needed.

    • /forcerestart: Forces a restart of the computer as soon as the update is finished.

  • Linux - Software Packages
    • There is a bunch of different software packages based on the distro that you are on
    • Think like .deb or something for debian distributions
    • You can use the dpkg command in order to install a given debian package
  • Mobile App Packages
    • Software for mobile operating systems, you get packages in the form of apps, or applications

    • App Stores a central, managed marketplace for app developers to publish and sell mobile apps

    • This is where you can generally get packages/apps for mobile systems, and not generally from any website, though it is not impossible

    • It is basically a central interface for downloading apps

    • These applications are generally signed and approved for use on these specific operating systems

    • Enterprise App Management allows for an organization to use software for the application that they themselves wrote, it is generally not available for the public, and is able to run on these specific operating systems

    • Mobile Device Management (MDM)- something that an IT professional does, and basically allows for you to manage enterprise apps for organizations

    • Side-Loading where you install mobile apps directly, without an app store, think about like the Citra emulator on your phone, you give the download permissions and it works

    • Mobile apps are specifically designed to hold all of their own dependencies, and therefore store all of their own data, and so to get an application back to the same way it was whenever you first installed it, all you need to do is clear it’s cache

  • Windows - Archives
    • Archive- Comprised of one or more files that’s compressed into a single file

    • Package Archive- the core or source software files that are compressed into one file

    • This is basically installing the zipped files, also known as archives, popular ones include .tar .rar .zip

    • To install the content inside of an archive, you need to unzip / extract the archive, and then you are able to install the inner contents based on the given installation process

    • These save up space and are able to hold more data for less disk space

    • 7-Zip (basically the goat for extracting shit), you can just extract it regularly with windows, and I believe that this is the underlying system that windows uses for archiving and extracting files (I lied, it is not, they use libarchive)

    • If you are using Powershell, you can zip them with 7-Zip from the command line, see General Commands For Command Line Interfaces

  • Linux - Archives
    • 7-Zip is also available to be used on linux, just use 7z e <path to extraction> <path to other extraction>
  • Windows - Package Dependencies
    • Basically, these are things that are needed for a given piece of software to be able to run

    • Having Dependencies- Counting on other pieces of software to make an application work, since one bit of code depends on another, in order to work

    • Library- a way to package a bunch of useful code that someone else wrote

    • Dynamic Link Libraries (. dll)- basically files that are used by a specific game in order to reference code that is useful and lets the software that needs it run

    • Dynamic Link Libraries are better also because they basically can be shared across software, and help less memory be used

    • An installation package will usually use something like the Windows msi files, and therefore also just have those library packages right there next to the executable

    • dll hell was basically whenever you would install a newer version of a .dll software and it would break software reliant on old .dll code

    • Side By Side Assemblies (SXS) these are shared libraries stored in C:\Windows\Wind\sxs, if a specific library is needed to be loaded by an application it will be specified in a manifest and it will then load the right library and version for that application

    • You can also use a windows package manager for this as well

  • Supplemental Reading for Windows Package Dependencies
    • DLLs are made up of programming modules that contain reusable code. Multiple applications can use and reuse the same DLL files.

    • For example, the Comdlg 32 DLL file is used by many applications to provide Windows dialog box functions.

    • Being reusable helps to save on disk space and ram

    • Common dll files used by Windows:

      • .drv files - Device drivers manage the operation of physical devices such as printers.
      • .ocx files - Active X controls provide controls like the program object for selecting a date from a calendar.
      • .cpl files - Control panel files manage each of the functions found in the Windows Control Panel.
    • dll files are also only loaded in as needed, so if an application needs one it will load, otherwise it will not and this will save memory, even works with portions of different dll files

    • A package dependency is created when an application uses a dll file. Window’s dll system is good at sharing dll, errors can still occur:

      • Overwriting DLL dependencies - It is possible for an application to overwrite the DLL dependency of another app, causing the other app to fail. 
      • Deleting DLL files - Some applications and malware may delete the DLLs needed by other applications installed on a system. 
      • Applying upgrades or fixes to DLLs - Can cause a problem called “DLL hell” where an application installs a new version of the shared DLL for a computer system. However, other applications that are dependent on the shared DLL have not yet been updated to be compatible with the new version of the DLL. This causes the other applications to fail when the end user tries to launch them.  
      • Rolling-back to previous DLL versions - A user may try to reinstall an older application that stopped working after a shared DLL file was upgraded by a newer app. However, the reinstallation of the app that uses the old DLL version can overwrite the new DLL file. This DLL version roll-back can cause the newer app with the shared DLL dependency to fail the next time it tries to run.
    • There are some fixes implemented by windows for this however:

      • Windows File Protection - The Windows OS controls the updates and deletions of system DLL files. Windows File Protection will allow only applications with valid digital signatures to update and delete DLL files.  

      • Private DLLs - Removes the sharing option from DLLs by creating a private version of the DLL and storing it in the application’s root folder. Changes to the shared version of the DLL will not affect the application’s private copy. 

      • .NET Framework assembly versioning - Resolves the “DLL hell” problem by allowing an application to add an updated version of a DLL file without removing the older version of the DLL file. This prevents the malfunction of applications that have dependencies on the older DLL file. The DLL versions can be found in the “C:\Windows\assembly” path and are placed in the Global Assembly Cache (GAC). The GAC contains the .NET “Strong Name Assembly” of each DLL file version. This “Strong Name Assembly” includes the: 

        • name of the assembly - multiple DLL files can share the assembly name 
        • version number - differentiates the version of DLLs 
        • culture - country or region where the application is deployed, can be “neutral”
        • public key token - a unique 16-character key assigned to an assembly when it is built
  • Linux - Package Dependencies
    • Dependencies can be other packages or shared libraries as well, linux shared libraries are similar to that of dll files in windows
    • Package managers however, like apt, flatpak, or snap generally have you covered though, where you are able to install a package along side any found dependencies

==Package Managers

  • Windows: Package Manager
    • Package Manager- makes sure that the process of software installation, removal, update, and dependency management is as easy and automatic as possible

    • Instead of going through the web browser for windows to download software or updates, then you can basically just use the package manager

    • Chocolaty- is a third party package manager for windows, it lets you install things through the command line, and lets you basically act in the way that a package manager should act

    • You can also manage the inner repository of what is available for download within itself, and SCCM and Puppet are both compatible with Chocolaty

    • This makes it very automatic and simple in order to ship out software to your entire office

    • For the command line interface for installing and managing packages, please reference General Commands For Command Line Interfaces

  • Supplemental reading for Windows Package Managers
    • NuGet package manager: here.
    • Chocolatey package manager: here.
  • Linux: Package Apt Manager
    • Advanced Package Tool (APT) basically the pretty standard package manager for linux distros, you can also have things like flatpak or snap
    • It is used to extend the functionality of the dpkg command
    • You can install things via something like sudo apt install <name> and then remove them by just changing that install to a remove
    • A bunch of the lists are in etc/apt/sources.list in case you want to change up or add to the list of packages you can download
  • Supplemental Reading for Linux PPAs
    • If you work in a Linux environment, there are also special repositories known as PPAs or Personal Package Archives. PPAs are hosted on Launchpad servers. For more information about PPAs, check out the link here.

==What’s happening in the background

  • Windows - Underneath the Hood
    • What really happens underneath everything whenever you install or update a package?

    • Imagine some installation fucks up a config file it’s not supposed to, and its your job to fix it

    • When you click on an installation executable, then it depends on what happens under the hood. If it is custom, then you can’t really know because of:

    • Closed Source Packages- packages where you can’t look at the source code to see what the program is doing

    • Even if you can not actually read the code that is being executed, you can use programs to see what that code is doing

    • A tool called process monitoring program provided by the sysinternals tools in windows lets you see what files are being written to or created

    • An msi file or an executable running via msi will run specific rules based on the tables that are explicitly set for msi inside of the windows operating system. They will use those specific tables with given rules and dependencies and will install your software that way

    • The msi file will set up a specific set of instructions for both the creation, and eventual deletion of that file as well

    • Orca.exe is a useful program that helps you create or modify installer packages

  • Windows Setting Panel
    • The Windows settings panels allow users to view and change system settings in Windows. Each setting group has a panel that allows changes to several system features. This guide explains the function of each settings panel. 
    • Download the Windows settings panel reference guide to learn about each settings panel.
  • Supplemental Reading for Windows Installers and Process Monitors
  • Linux: Underneath the Hood
    • You can install software directly from source code. If you have an archive with a simple executable that lets you install you can do it that way
    • The setup_script basically lets you see it and see whats going on
    • Also a bunch of times there will be a README.md file
    • Basically a lot less convoluted than it is on windows, you can read the code if you wanna

==Device Software Management

  • Windows - Devices and Drivers
    • Driver- used to help our hardware devices interact with our Operating System

    • Device drivers and managing them

    • In windows, all of the drivers are stored in one place called the Device Manager

    • You can get to it via the the search box by typing in devmgmt.msc, or you can just right click the windows logo and go to it from there

    • The drivers are grouped together based on what they do, usually

    • Plug and Play Manager basically, detects drivers whenever you plug in a new device and downloads the drivers for it then and there, but sometimes you do need to update your drivers yourself

    • The way that this works is the manufacturer of the device that you plug in has attached a few stringed bits of information onto the hardware that is then read by windows and applied to it’s driver downloads

    • It looks for it in a few places, first the database it has of well known drivers, and if not there, then it goes to the driver store / windows update if it will need to. If the device comes with custom drivers software, you can tell windows to find it there as well

    • Windows then takes the driver software and then install it automatically, but you can manually fuck with them inside of that Device Manager Menu

  • Supplemental Reading for Windows Devices and Drivers
    • For an Introduction to Plug and Play click here.

    As discussed in the previous lecture video, when Windows notices that a new device has been connected, the first thing it will do is ask the device that’s been plugged in for it’s Hardware ID. For more information on hardware identification click here.

    Once Windows has the Hardware ID of the new device, the OS uses that ID to search for the right driver for the device, For more information on this click here.

    It looks in a few places for the driver, starting with a local list of well-known drivers, then going onto Windows Update or the Driver Store. For more information click here.

  • Linux - Devices and Drivers
    • Ubuntu has a more messy way of showcasing all of your drivers

    • Inside of ubuntu, all of the given drivers are basically just stored as files inside of the /dev/ directory

    • Pasted image 20260718121923.png

    • There is a lot of different device types

    • Character Devices- like a keyboard or a mouse, they transmit data over character by character

    • Block devices- like USB drives, hard drives, and CDROMs, transfer blocks of data; a data block is just a unit of data storage

    • /dev/sda or /deb/sdb are basically your harddrives, sd devices in general are large storage devices

    • For updating drivers inside of linux, sometimes they are basically part of the linux kernel and not always installed inside of that /dev devices folder

    • A lot of hardware support is built into the kernel, and therefore whenever you plug it in, it kind of just works

    • If a piece of hardware does not have built in kernel support, it will most likely have a kernel module, which extend the kernels functionality without really touching it

  • Supplemental Reading for Linux Devices and Drivers
    • Some devices located inside of the /dev directory are:

      • /dev/sda - First SCSI drive
      • /dev/sr0 - First optical disk drive 
      • /dev/usb - USB device
      • /dev/usbhid - USB mouse
      • /dev/usb/lp0 - USB printer
      • /dev/null - discard
    • Some of the Linux device categories include:

      • Block devices: Devices that can hold data, such as hard drives, USB drives, and filesystems.
      • Character devices: Devices that input or output data one character at a time, such as keyboards, monitors, and printers. 
      • Pipe devices: Similar to character devices. However, pipe devices send output to a process running on the Linux machine instead of a monitor or printer.
      • Socket devices: Similar to pipe devices. However, socket devices help multiple processes communicate with each other.
  • Windows - Operating System Updates
    • Operating System updates basically work the exact same was as any other software update
    • Security Patch- software that is meant to fix up some sort of a security hole
    • It is important to update your operating system with these security updates so you are safe on your computer
    • The operating system basically updates you with all the times it might need to get updated, if you allow them to
    • Generally, it will ask you if you want to update them automatically or manually
    • You can do this by going to the Windows Update portion of the windows settings portion, with different options, like downloading once a month, or every single time there is one, basically a bunch of different stuff
  • Linux - Operating System Updates
    • The kernel controls the main system of the operating system, and if you want to update them, you can see what version of the kernel is it that you have via uname and the -r flag
    • To then update your given kernel, you would run apt full-upgrade

==Glossary

App Store apps: A Package Manager that acts as a repository

App store repository: A app store service that also acts as a repository

App stores: A central managed marketplace for app developers to publish and sell mobile apps

APPX: An APPX is another way to package contents of a file to act like a unit of distribution

Archive: An archive is comprised of one or more files that are compressed into a single file” for verb agreement

Block devices: A system that acts like USB drives and hard drive by transmitting data

Cache: The assigned stored location for recently or frequently accessed data; on a mobile app it is where anything that was changed or created with that app is stored 

Character devices: A way to transmit data character by character like a keyboard and mouse

Chocolatey: A third party package manager for Windows

Closed source packages: A source code that does not allow public access

Debian(.deb): A Debian package is packaged as a .deb file

Device manager: A console management system for your device

Driver: Used to help our hardware devices interact with our Operating System

Dynamic-link libraries: Programs that want to use functionality that the code provides can tap into it if they need to (shared libraries) 

Enterprise app management: A management system that allows an organization to distribute custom mobile apps

Executable file: A file containing instructions for a computer to execute when they’re run

Hardware ID: A special string of characters assigned to hardware

Having dependencies: A process of counting on other pieces of software to make an application work since one bit of code depends on another in order to work

Installing from source: A process of installing from a source

Kernel module: It extends the kernel’s functionality so developers don’t have to actually touch the Linux kernel

Library: A way to package a bunch of useful code that someone else wrote

Manifest: A library used if an application needs to use a shared library

Microsoft Install Package(.msi) and MSI files: Microsoft Install Package is a file extension used to guide a program called Windows Installer in the installation, maintenance, and removal of programs of the windows operating systems. MSI files are a combination of of databases that contain installation instructions in different tables along with all the files

Mobile applications: Software that is distributed on mobile OS devices 

Packaged archives: The core or source software files that are compressed into one file

Packaged managers: An application that makes package installation and removal easier

Personal package archives: A software repository for uploading source packages to be built and published 

Portable Executable (PE) format: Windows unique version of .exe

Process monitoring: A way of monitoring what processes are happening during installation

Repository: A server that acts like a central storage location for packages

SD devices: Mass storage devices like hard drives

Security patch: A piece of software that is meant to fix up a security hole

Side-by-side assemblies: A system that manages most shared libraries and resources on Windows and supports access to multiple versions of the same shared library automatically

Side-loading: A process of installing mobile apps directly without using an app store

Sysinternals package: A set of tools released by Microsoft that can help you troubleshoot

Windows store: A Windows store is an application repository or warehouse where you can download and install universal Windows platform apps

Windows update client service: System that runs in the background on your computer to download and install updates and patches for your operating system


References