Code Monkey home page Code Monkey logo

macoslobapptool's Introduction

macOSLOBAppTool

Background

This tool is designed to manage macOS apps that cannot be distributed via MEM when wrapped as an .intunemac file. There are a number of limitations using the wrapping method, some of them being that only .pkg files are supported and that we have to rely on the MDM framework in macOS to detect the app. Only apps installed to /Applications can be detected with this method and the app must have a very sepcific structure to be detected. If the app does not include specific parameters your only option is to ask the developer to change this.

If you have a .dmg package you would like to publish in MEM, you would have to convert this to a .pkg. When doing this you must have a Apple Developer certificate to sign your converted app.

Solution

With the above limitations in mind I decided to build a tool which can deploy virtually any app using the Microsoft Intune Agent to run scripts and Azure Storage Account to build a app repository.

When running the tool, the app won't be wrapped but instead uploads to an Azure blob and a macOS shell script is created in MEM. The tool now uses Microsoft's shell script for installing applications, this update introduces huge improvements to logging and update functionality.

Using this version, 7-Zip will be required to be installed since it will try to grab the CFBundleName from the Info.plist, if it fails, the package will be skipped.

The CFBundleName will be used to create strings which will be added to the install script. Note that it will use the CFBundleName to create the "processpath" variable string which is used to terminate the process when updating if you choose to do so. Some applications does not use the same name for the process, for example Firefox CFBundleName is "Firefox", but the process path is /Applications/Firefox.app/Contents/MacOS/firefox with lower case. Default will be /Applications but your app might have another path. It's important to review and update the apps info in the grid.

For guidance on what the parameters used means, see this link.

Before using, keep in mind that this is an early version of this tool. Test thoroughly.

Planned features

  • Change install script to Microsoft's shell script for enhanced logging and functionality
  • Ability to assign app from the WPF
  • Handle updating apps from WPF
  • Get CFBundleShortVersion from .pkg packages using 7-zip
  • Add a dark theme switch. Why you ask? Because it's fun

Pre-requisites

To use this tool you need a couple of moduels installed

  • Az.Storage
  • Microsoft.Graph.Authentication
  • 7-Zip

Also, a storage account must already be created. Using this tool it is assumed that the container is publicly available.

Powershell versions

✅ 7.1.3

✅ 7.0.4

❌ 5.X

Usage

Before use, you might have to unblock the files.

Launch the script by typing: .\path\to\macoslobapptool.ps1

Screenshots

Light/Dark mode

newLight newDark updateLight updateDark

Badges

mlatuploadbadge mlatupdatebadge

Warning popup

mlatwarning

Console output

consoleOutput

If more than one storage account exists, you will be asked to pick one to create a new storage context stSelection

Azure blob

image

MEM Shell script

memScript

Changelog

Version 2.0 2021-09-14

  • Install script changed to Microsoft's shell script
  • When updating, the script that already exists for the app will be updated in MEM, i.e. it won't be unassigned or deleted
  • Removed "unassign" button from Update tab
  • Changed grid columns to align with Microsoft's shell script
  • Check to see if more than one storage accounts is returned

Version 1.04.07.01 2021-04-07

  • Added update functionality
  • Added button badges when uploading/updating
  • New tabbed interface for uploading new packages and updating
  • Added popup messages for warnings (thanks smsagent)
  • Renamed Themes folder to Assembly
  • Added material icons and removed Octions
  • Updated shell script for installing apps to handle versions in format of X.X.X
  • Added dark theme switch, now you can upload/update in style 😎

Version 1.04.01.01 2021-04-01

  • Added function to assign packages
  • The tool now tries to extract CFBundleShortVersion from .PKGs
  • Removed the dependecy of 7z.exe in script folder, it now snags the path to the EXE from registry
  • Added button to GitHub repo to the top
  • Added twitter icon with @handle to the top

Version 1.03.31.01 2021-03-31

  • Removed script frequency, the script now only executes one time on devices

Version 1.0 2021-03-30

  • Initial release

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.