From 58c1ccc051a475c6c59856d421fc7390509f2a77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Sat, 10 Sep 2005 19:37:20 +0000 Subject: [PATCH] Also add registry entries when driver files are already present svn path=/trunk/; revision=17787 --- reactos/subsys/system/vmwinst/vmwinst.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/reactos/subsys/system/vmwinst/vmwinst.c b/reactos/subsys/system/vmwinst/vmwinst.c index 74b53977c4e..1e34bc619f9 100644 --- a/reactos/subsys/system/vmwinst/vmwinst.c +++ b/reactos/subsys/system/vmwinst/vmwinst.c @@ -124,7 +124,8 @@ FileExists(WCHAR *Path, WCHAR *File) if(FileHandle == INVALID_HANDLE_VALUE) { - return FALSE; + /* If it was a sharing violation the file must already exist */ + return GetLastError() == ERROR_SHARING_VIOLATION; } if(GetFileSize(FileHandle, NULL) <= 0) @@ -503,7 +504,14 @@ PageWelcomeProc( { if(DriverFilesFound) { - /* FIXME - check for existing registry entries! */ + if(!AddVmwareRegistryEntries()) + { + WCHAR Msg[1024]; + LoadString(hAppInstance, IDS_FAILEDTOADDREGENTRIES, Msg, sizeof(Msg) / sizeof(WCHAR)); + MessageBox(GetParent(hwndDlg), Msg, NULL, MB_ICONWARNING); + SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_WELCOMEPAGE); + return TRUE; + } if(!EnableVmwareDriver(TRUE, TRUE, TRUE)) {