Installing OneNote for MacOS using JumpCloud Commands

I had a request from a user on the JumpCloud Slack Lounge for a script to install Microsoft OneNote on MacOS. So here it is, follows the form of all of my other scripts. Any questions leave a comment below and I will try to answer the best I can.

# Script to download, Silent Install and then clean up once installed Microsoft onenote for Mac
# Writen by twitter.com/richhickson
# www.RichardHickson.com

#Make temp folder for downloads.
mkdir "/tmp/onenote/";
cd "/tmp/onenote/";

#Download Word, PowerPoint and Excel into temp folder.
curl -L -o /tmp/onenote/onenote.pkg "https://go.microsoft.com/fwlink/?linkid=820886";

#Silent Install each application.
sudo -S installer -allowUntrusted -pkg "/tmp/onenote/onenote.pkg" -target /;

#Remove Temp Files
sudo rm -rf "/tmp/onenote/";

7 thoughts on “Installing OneNote for MacOS using JumpCloud Commands”

  1. Hi Richards,

    I have a Zip file, which contains .pkg file and XML.
    Can you please provide the script to unzip the file and then install the .pkg silently from the same folder where XML is ?

    Kind regards,
    WZ

    Reply
    • Hi Waseem, How big is the zip file? If its over 2mb it will need storing somewhere accesible? Send me an email to richard @ helpfullyit.com and I can help you out.
      Thanks
      Rich

      Reply
  2. Thanks for your reply, i already scripted it and it is working now. 🙂

    Your material is really helpful, Good work 🙂

    For storage, i used G-drive storage :). Appreciated.

    Reply
  3. I was wondering how one might go about writing a script to pull the most recent .pkg from a Github (or similar) repo. We use Nextcloud for file syncing with a specific set of users, and I’d like to create a command that pulls/installs the latest pkg from the Releases page.

    Reply
    • Hi Topher.
      I just got this to work for the latest version of Dock Util. Change the url to the repo your looking for and it should work. It will download to where ever you run it to. (I didnt test as a command but i ran it as a shellscript and it worked perfectly.)

      curl -s https://api.github.com/repos/kcrawford/dockutil/releases/latest \
      | grep ".pkg" \
      | cut -d : -f 2,3 \
      | tr -d \" \
      | wget -qi -

      Reply

Leave a Comment