Skip to main content
3 of 4
added 393 characters in body
bmike
  • 241.3k
  • 80
  • 433
  • 958

What you ask is possible in several ways. Most require a bit of skill if you can’t change your installer to just run as non-admin. See homebrew for a great example of an installer that needs admin only at setup and not when installing new code.

If you need admin, one less reliable way is finding a privilege escalation bug - then you don’t need any admin password. These are sometimes referred to as zero day if someone uses this bug to install malware or steal information. These bugs can also be used for good purposes or at least neutral ones.

I think you only need a local privilege escalation. https://en.wikipedia.org/wiki/Privilege_escalation

Lastly, the dependable way is to write a daemon that runs as admin. Microsoft Office, Adobe and many other software does this, the installer system runs at launch or as a daemon and gets admin privileges and then uses the OS to run periodically.

This avoids the design intent for the installer to ask for admin at the last moment when installations trigger. Following the design intent is generally more secure and far less work for you and your customers.

bmike
  • 241.3k
  • 80
  • 433
  • 958