Bazaar/Updater : Uses SysExecGui package to run tasks as admin

git-svn-id: svn://ultimatepp.org/upp/trunk@3057 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
micio 2011-01-22 09:36:16 +00:00
parent 87919d1abb
commit 8295288b80
3 changed files with 7 additions and 7 deletions

View file

@ -27,6 +27,7 @@ String Updater::GetPlatformRoot(void)
#endif
}
///////////////////////////////////////////////////////////////////////////////////////
// constructor
Updater::Updater()
{
@ -207,10 +208,9 @@ bool Updater::START_Updater(String const &operation)
if(chmod(~tempName, 0755) != 0)
return true;
// note the -k to gksu -- it makes it preserve the environment
String params = "-k -u root \"" + tempName + "\"";
if(SysStart("gksu", params, environ) == -1)
return true;
// executes the file asking for password
return SysStartAdmin(tempName, "", environ);
#else
// for windows, simply execute the file
if(SysStart(tempName, "", environ) == -1)

View file

@ -2,8 +2,8 @@ description "Web Installer/Updater module\377";
uses
CtrlLib,
SysExec,
Web;
Web,
SysExecGui;
file
Updater.iml,

View file

@ -1,6 +1,6 @@
#ifndef _Updater_icpp_init_stub
#define _Updater_icpp_init_stub
#include "CtrlLib/init"
#include "SysExec/init"
#include "Web/init"
#include "SysExecGui/init"
#endif