Getting admin permissions - how does this work?

Various times I’ve thought about building my own installer.

The only real issue is that the current installers ask for the administrator password, so as to install to protected locations.

Is there a way to elevate the process to being run by an administrator programatically?

I coded a complete juce installer (even looks like native ones)

Its amazing cause i can define the project structure on a mac and install on a pc.

It has online and offline capabilities, took me like 5 days

on Visual Studio you just change the invocation Process (runAsAdministrator), and you need a codesign certificate and sign it or you get the “unknown developer warning”

on Mac, i use AppleScript and osascript permission asking, and you need to sign it.

And i just handle both installs in two classes related to platform.

You can see it in action at: