diff options
author | (no author) <(no author)@4f64403b-2f21-0410-a795-97e2b3489a10> | 2010-11-22 01:51:38 +0000 |
---|---|---|
committer | (no author) <(no author)@4f64403b-2f21-0410-a795-97e2b3489a10> | 2010-11-22 01:51:38 +0000 |
commit | a7d62ddc856e55582e5cd86070abde7d045455c3 (patch) | |
tree | 72c0eacaf22664d855d36b95387c9173a08ca67a /updater/services.cpp | |
parent | a5d9664607e39299a84240b2342c3e5594eb1c48 (diff) |
Added ability to update in directories protected by UAC
git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@577 4f64403b-2f21-0410-a795-97e2b3489a10
Diffstat (limited to 'updater/services.cpp')
-rw-r--r-- | updater/services.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/updater/services.cpp b/updater/services.cpp index feac2c1..e64e8da 100644 --- a/updater/services.cpp +++ b/updater/services.cpp @@ -354,17 +354,13 @@ void CheckForUpdatesWorker(void *param) { // we're not doing an 'update and shutdown', and we're not updating any active dlls...so just install
// get folders
- TCHAR root_folder[MAX_PATH], plugins_folder[MAX_PATH], *p;
+ TCHAR root_folder[MAX_PATH], plugins_folder[MAX_PATH];
+
+ GetRootDir(root_folder);
- GetModuleFileName(0, root_folder, MAX_PATH);
_tcscpy(plugins_folder, root_folder);
- p = _tcsrchr(plugins_folder, '\\');
- if (p) *p = 0;
_tcscat(plugins_folder, _T("\\Plugins"));
- p = _tcsrchr(root_folder, _T('\\'));
- if (p) *p = 0;
-
// move files
MoveFiles(0, options.temp_folder, plugins_folder, options.backup_folder, root_folder);
|