[setup16]
authorChristoph von Wittich <christoph_vw@reactos.org>
Sun, 11 Mar 2012 19:04:07 +0000 (19:04 +0000)
committerChristoph von Wittich <christoph_vw@reactos.org>
Sun, 11 Mar 2012 19:04:07 +0000 (19:04 +0000)
check if setup.lst file exists

svn path=/trunk/; revision=56121

reactos/base/applications/setup16/main.c

index f6cd5e8..2c50557 100644 (file)
@@ -83,6 +83,12 @@ int APIENTRY wWinMain(HINSTANCE hInstance,
     wcscpy(szFileName, szSetupPath);
     wcscat(szFileName, L"setup.lst");
     
+    if (GetFileAttributes(szFileName) == INVALID_FILE_ATTRIBUTES)
+    {
+        MessageBoxW(0, L"Cannot find Setup.lst file", L"Error", MB_OK | MB_ICONERROR);
+        return 1;
+    }
+    
     /* read information from setup.lst */
     GetPrivateProfileStringW(NT_PARAMS, L"CabinetFile", NULL, szCabFileName, MAX_PATH, szFileName);
     GetPrivateProfileStringW(NT_PARAMS, L"TmpDirName", NULL, szTempDirName, 50, szFileName);