VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Setup/Setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/Setup/Setup.c')
-rw-r--r--src/Setup/Setup.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/Setup/Setup.c b/src/Setup/Setup.c
index c0fffb77..5decf595 100644
--- a/src/Setup/Setup.c
+++ b/src/Setup/Setup.c
@@ -2012,7 +2012,14 @@ int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, char *lpszComm
}
// System Restore
- SystemRestoreDll = LoadLibrary ("srclient.dll");
+ char dllPath[MAX_PATH];
+ if (GetSystemDirectory (dllPath, MAX_PATH))
+ {
+ strcat(dllPath, "\\srclient.dll");
+ }
+ else
+ strcpy(dllPath, "C:\\Windows\\System32\\srclient.dll");
+ SystemRestoreDll = LoadLibrary (dllPath);
if (!bUninstall)
{