0

I have a C++ script that is checking for an update and if found installing it.

In order to install the update it's going to have to request sudo/admin access. At the moment I have it executing command

std::string command = "sudo install -pkg /path/to/pkg -target /" 
system(command.c_str())

However, it requests the sudo creds in terminal which a normal user wouldn't see. How can I spawn an authentication window in order to authenticate the install?

This could be entirely the wrong approach, so if there is a better way please do say.

0 Answers0