From c49bf7d075d28c93250b762cfee6e6f2c868b199 Mon Sep 17 00:00:00 2001 From: micio Date: Sun, 23 Jan 2011 17:29:02 +0000 Subject: [PATCH] Bazaar/Updater : Now using SysExecGui package to run installer tasks git-svn-id: svn://ultimatepp.org/upp/trunk@3074 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- bazaar/Updater/Updater.cpp | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/bazaar/Updater/Updater.cpp b/bazaar/Updater/Updater.cpp index 6ddc706dc..aa32eee67 100644 --- a/bazaar/Updater/Updater.cpp +++ b/bazaar/Updater/Updater.cpp @@ -3,7 +3,7 @@ #include #include -#include +#include #define IMAGECLASS UpdaterImg #define IMAGEFILE @@ -207,18 +207,12 @@ bool Updater::START_Updater(String const &operation) // allowing its execution and executes it as a superuser if(chmod(~tempName, 0755) != 0) return true; +#endif // executes the file asking for password - return SysStartAdmin(tempName, "", environ); - -#else - // for windows, simply execute the file - if(SysStart(tempName, "", environ) == -1) - return true; -#endif - // installer process is spawned correctly - // main app must leave - return false; + bool res = !SysStartAdmin(tempName, "", environ); + return res; + } // uninstall app @@ -520,7 +514,8 @@ void Updater::RestartApp(RestartModes restartMode) #endif break; } - SysStart(path, commandLine, environ); + // restart app in user mode, no gui, no password should be needed + SysStartUser(user, "", path, commandLine, environ); } // fetch list of available app versions