Open/create all files with the necessary rights.
Modified: trunk/reactos/subsys/system/usetup/bootsup.c
Modified: trunk/reactos/subsys/system/usetup/cabinet.c
Modified: trunk/reactos/subsys/system/usetup/filesup.c
Modified: trunk/reactos/subsys/system/usetup/inicache.c

Modified: trunk/reactos/subsys/system/usetup/bootsup.c
--- trunk/reactos/subsys/system/usetup/bootsup.c	2005-05-02 19:12:31 UTC (rev 14950)
+++ trunk/reactos/subsys/system/usetup/bootsup.c	2005-05-02 20:30:29 UTC (rev 14951)
@@ -564,7 +564,7 @@
 			     NULL);
 
   Status = NtOpenFile(&FileHandle,
-		      FILE_READ_ACCESS,
+		      GENERIC_READ,
 		      &ObjectAttributes,
 		      &IoStatusBlock,
 		      0,
@@ -602,7 +602,7 @@
 			     NULL);
 
   Status = NtCreateFile(&FileHandle,
-			FILE_WRITE_ACCESS,
+			GENERIC_WRITE,
 			&ObjectAttributes,
 			&IoStatusBlock,
 			NULL,
@@ -667,7 +667,7 @@
 			     NULL);
 
   Status = NtOpenFile(&FileHandle,
-		      FILE_READ_ACCESS,
+		      GENERIC_READ,
 		      &ObjectAttributes,
 		      &IoStatusBlock,
 		      0,
@@ -716,7 +716,7 @@
 			     NULL);
 
   Status = NtOpenFile(&FileHandle,
-		      FILE_READ_ACCESS,
+		      GENERIC_READ,
 		      &ObjectAttributes,
 		      &IoStatusBlock,
 		      0,
@@ -762,7 +762,7 @@
 			     NULL);
 
   Status = NtCreateFile(&FileHandle,
-			FILE_WRITE_ACCESS,
+			GENERIC_WRITE,
 			&ObjectAttributes,
 			&IoStatusBlock,
 			NULL,
@@ -831,7 +831,7 @@
 			     NULL);
 
   Status = NtOpenFile(&FileHandle,
-		      FILE_READ_ACCESS,
+		      GENERIC_READ,
 		      &ObjectAttributes,
 		      &IoStatusBlock,
 		      0,
@@ -880,7 +880,7 @@
 			     NULL);
 
   Status = NtOpenFile(&FileHandle,
-		      FILE_READ_ACCESS,
+		      GENERIC_READ,
 		      &ObjectAttributes,
 		      &IoStatusBlock,
 		      0,
@@ -932,7 +932,7 @@
 			     NULL);
 
   Status = NtCreateFile(&FileHandle,
-			FILE_WRITE_ACCESS,
+			GENERIC_WRITE,
 			&ObjectAttributes,
 			&IoStatusBlock,
 			NULL,
@@ -975,7 +975,7 @@
 			     NULL);
 
   Status = NtOpenFile(&FileHandle,
-		      FILE_WRITE_ACCESS,
+		      GENERIC_WRITE,
 		      &ObjectAttributes,
 		      &IoStatusBlock,
 		      0,
@@ -1038,7 +1038,7 @@
 			     NULL);
 
   Status = NtOpenFile(&FileHandle,
-		      FILE_READ_ACCESS,
+		      GENERIC_READ,
 		      &ObjectAttributes,
 		      &IoStatusBlock,
 		      0,
@@ -1087,7 +1087,7 @@
 			     NULL);
 
   Status = NtOpenFile(&FileHandle,
-		      FILE_READ_ACCESS,
+		      GENERIC_READ,
 		      &ObjectAttributes,
 		      &IoStatusBlock,
 		      0,
@@ -1135,7 +1135,7 @@
 			     NULL);
 
   Status = NtOpenFile(&FileHandle,
-		      FILE_WRITE_ACCESS | FILE_WRITE_ATTRIBUTES,
+		      GENERIC_WRITE,
 		      &ObjectAttributes,
 		      &IoStatusBlock,
 		      0,
@@ -1195,7 +1195,7 @@
 			     NULL);
 
   Status = NtOpenFile(&FileHandle,
-		      FILE_READ_ACCESS,
+		      GENERIC_READ,
 		      &ObjectAttributes,
 		      &IoStatusBlock,
 		      0,
@@ -1244,7 +1244,7 @@
 			     NULL);
 
   Status = NtOpenFile(&FileHandle,
-		      FILE_READ_ACCESS,
+		      GENERIC_WRITE,
 		      &ObjectAttributes,
 		      &IoStatusBlock,
 		      0,
@@ -1292,7 +1292,7 @@
 			     NULL);
 
   Status = NtOpenFile(&FileHandle,
-		      FILE_WRITE_ACCESS | FILE_WRITE_ATTRIBUTES,
+		      GENERIC_WRITE,
 		      &ObjectAttributes,
 		      &IoStatusBlock,
 		      0,
@@ -1357,7 +1357,7 @@
 			     NULL);
 
   Status = NtOpenFile(&FileHandle,
-		      FILE_READ_ACCESS,
+		      GENERIC_READ,
 		      &ObjectAttributes,
 		      &IoStatusBlock,
 		      0,
@@ -1406,7 +1406,7 @@
 			     NULL);
 
   Status = NtOpenFile(&FileHandle,
-		      FILE_READ_ACCESS,
+		      GENERIC_READ,
 		      &ObjectAttributes,
 		      &IoStatusBlock,
 		      0,
@@ -1457,7 +1457,7 @@
 			     NULL);
 
   Status = NtOpenFile(&FileHandle,
-		      FILE_WRITE_ACCESS | FILE_WRITE_ATTRIBUTES,
+		      GENERIC_WRITE,
 		      &ObjectAttributes,
 		      &IoStatusBlock,
 		      0,
@@ -1555,7 +1555,7 @@
 			     NULL);
 
   Status = NtOpenFile(&FileHandle,
-		      FILE_READ_ATTRIBUTES | FILE_WRITE_ATTRIBUTES,
+		      GENERIC_READ|GENERIC_WRITE,
 		      &ObjectAttributes,
 		      &IoStatusBlock,
 		      0,
@@ -1626,7 +1626,7 @@
 			     NULL);
 
   Status = NtOpenFile(&FileHandle,
-		      FILE_READ_ATTRIBUTES | FILE_WRITE_ATTRIBUTES,
+		      GENERIC_READ|GENERIC_WRITE,
 		      &ObjectAttributes,
 		      &IoStatusBlock,
 		      0,

Modified: trunk/reactos/subsys/system/usetup/cabinet.c
--- trunk/reactos/subsys/system/usetup/cabinet.c	2005-05-02 19:12:31 UTC (rev 14950)
+++ trunk/reactos/subsys/system/usetup/cabinet.c	2005-05-02 20:30:29 UTC (rev 14951)
@@ -1319,7 +1319,7 @@
         NULL);
 
       NtStatus = NtOpenFile(&FileHandle,
-        FILE_READ_ACCESS,
+		    GENERIC_READ,
 		    &ObjectAttributes,
 		    &IoStatusBlock,
 		    FILE_SHARE_READ,
@@ -1673,7 +1673,7 @@
     NULL);
 
   NtStatus = NtCreateFile(&DestFile,
-    FILE_WRITE_ACCESS,
+    GENERIC_WRITE|FILE_READ_ATTRIBUTES,
     &ObjectAttributes,
     &IoStatusBlock,
     NULL,
@@ -1692,7 +1692,7 @@
         {
           /* Create destination file, overwrite if it already exists */
           NtStatus = NtCreateFile(&DestFile,
-            FILE_WRITE_ACCESS,
+            GENERIC_WRITE|FILE_READ_ATTRIBUTES,
             &ObjectAttributes,
             &IoStatusBlock,
             NULL,

Modified: trunk/reactos/subsys/system/usetup/filesup.c
--- trunk/reactos/subsys/system/usetup/filesup.c	2005-05-02 19:12:31 UTC (rev 14950)
+++ trunk/reactos/subsys/system/usetup/filesup.c	2005-05-02 20:30:29 UTC (rev 14951)
@@ -125,7 +125,7 @@
 			     NULL);
 
   Status = NtOpenFile(&FileHandleSource,
-		      FILE_READ_ACCESS,
+		      GENERIC_READ,
 		      &ObjectAttributes,
 		      &IoStatusBlock,
 		      FILE_SHARE_READ,
@@ -166,7 +166,7 @@
 			     NULL);
 
   Status = NtCreateFile(&FileHandleDest,
-			FILE_WRITE_ACCESS,
+			GENERIC_WRITE,
 			&ObjectAttributes,
 			&IoStatusBlock,
 			NULL,
@@ -383,7 +383,7 @@
 			     NULL);
 
   Status = NtOpenFile(&FileHandle,
-		      FILE_READ_ACCESS,
+		      GENERIC_READ,
 		      &ObjectAttributes,
 		      &IoStatusBlock,
 		      0,

Modified: trunk/reactos/subsys/system/usetup/inicache.c
--- trunk/reactos/subsys/system/usetup/inicache.c	2005-05-02 19:12:31 UTC (rev 14950)
+++ trunk/reactos/subsys/system/usetup/inicache.c	2005-05-02 20:30:29 UTC (rev 14951)
@@ -1082,7 +1082,7 @@
 			     NULL);
 
   Status = NtCreateFile(&FileHandle,
-			FILE_WRITE_ACCESS,
+			GENERIC_WRITE,
 			&ObjectAttributes,
 			&IoStatusBlock,
 			NULL,