Lazarus

Free Pascal => Unix => Topic started by: MaxCuriosus on April 14, 2020, 11:20:37 pm

Title: Installing deb package from within Lazarus/Pascal application
Post by: MaxCuriosus on April 14, 2020, 11:20:37 pm
Is it possible to install a deb package that requires superuser privilege from within Lazarus/Pascal application? Something that normally is done in the terminal or in a bash script in a way like

sudo dpkg -i abc.deb
Title: Re: Installing deb package from within Lazarus/Pascal application
Post by: lucamar on April 15, 2020, 12:21:32 pm
Yes, using TProcess (or one of the function in the Process unit) to run a transitory shell and passing to it the command you want to run.

Similar questions have been already answered in the forum; look for: "running a command as admin" or similar.
TinyPortal © 2005-2018