Also add registry entries when driver files are already present
Modified: trunk/reactos/subsys/system/vmwinst/vmwinst.c
_____
Modified: trunk/reactos/subsys/system/vmwinst/vmwinst.c
--- trunk/reactos/subsys/system/vmwinst/vmwinst.c 2005-09-10
19:21:49 UTC (rev 17786)
+++ trunk/reactos/subsys/system/vmwinst/vmwinst.c 2005-09-10
19:37:20 UTC (rev 17787)
@@ -124,7 +124,8 @@
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 @@
{
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))
{