Index: proc.c =================================================================== --- proc.c (revision 73453) +++ proc.c (working copy) @@ -2386,7 +2386,7 @@ /* Zero out the initial core variables and handles */ QuerySection = FALSE; InJob = FALSE; - SkipSaferAndAppCompat = TRUE; // HACK for making .bat/.cmd launch working again. + SkipSaferAndAppCompat = FALSE; ParameterFlags = 0; Flags = 0; DebugHandle = NULL; @@ -3051,12 +3051,12 @@ if (QuerySection) { /* Nothing to do */ - Status = STATUS_SUCCESS; + Status1 = STATUS_SUCCESS; } else { /* Get some information about the executable */ - Status = NtQuerySection(SectionHandle, + Status1 = NtQuerySection(SectionHandle, SectionImageInformation, &ImageInformation, sizeof(ImageInformation), @@ -3064,7 +3064,7 @@ } /* Do we have section information now? */ - if (NT_SUCCESS(Status)) + if (NT_SUCCESS(Status1)) { /* Don't ask for it again, save the machine type */ QuerySection = TRUE; @@ -3073,7 +3073,7 @@ } /* Is there a reason/Shim we shouldn't run this application? */ - Status = BasepCheckBadapp(FileHandle, + Status1 = BasepCheckBadapp(FileHandle, FreeBuffer, lpEnvironment, ImageMachine, @@ -3082,11 +3082,11 @@ &AppCompatSxsData, &AppCompatSxsDataSize, &FusionFlags); - if (!NT_SUCCESS(Status)) + if (!NT_SUCCESS(Status1)) { /* This is usually the status we get back */ - DPRINT1("App compat launch failure: %lx\n", Status); - if (Status == STATUS_ACCESS_DENIED) + DPRINT1("App compat launch failure: %lx\n", Status1); + if (Status1 == STATUS_ACCESS_DENIED) { /* Convert it to something more Win32-specific */ SetLastError(ERROR_CANCELLED); @@ -3094,7 +3094,7 @@ else { /* Some other error */ - BaseSetLastNTError(Status); + BaseSetLastNTError(Status1); } /* Did we have a section? */