Index: reactos/dll/win32/kernel32/client/appcache.c =================================================================== --- reactos/dll/win32/kernel32/client/appcache.c (revision 74697) +++ reactos/dll/win32/kernel32/client/appcache.c (working copy) @@ -15,7 +15,7 @@ /* GLOBALS ********************************************************************/ -ULONG g_ShimsEnabled = -1; +ULONG g_ShimsEnabled; static BOOL g_ApphelpInitialized = FALSE; static PVOID g_pApphelpCheckRunAppEx; static PVOID g_pSdbPackAppCompatData; Index: reactos/dll/win32/kernel32/client/proc.c =================================================================== --- reactos/dll/win32/kernel32/client/proc.c (revision 74687) +++ reactos/dll/win32/kernel32/client/proc.c (working copy) @@ -4660,9 +4660,7 @@ LPPROCESS_INFORMATION lpProcessInformation, PHANDLE hNewToken) { - PUNICODE_STRING CommandLine = NULL; - UNICODE_STRING DummyString; - UNICODE_STRING LiveCommandLine; + UNICODE_STRING CommandLine; UNICODE_STRING ApplicationName; UNICODE_STRING CurrentDirectory; BOOL bRetVal; @@ -4677,8 +4675,7 @@ RtlMoveMemory(&StartupInfo, lpStartupInfo, sizeof(*lpStartupInfo)); /* Initialize all strings to nothing */ - LiveCommandLine.Buffer = NULL; - DummyString.Buffer = NULL; + CommandLine.Buffer = NULL; ApplicationName.Buffer = NULL; CurrentDirectory.Buffer = NULL; StartupInfo.lpDesktop = NULL; @@ -4688,25 +4685,9 @@ /* Convert the Command line */ if (lpCommandLine) { - /* If it's too long, then we'll have a problem */ - if ((strlen(lpCommandLine) + 1) * sizeof(WCHAR) < - NtCurrentTeb()->StaticUnicodeString.MaximumLength) - { - /* Cache it in the TEB */ - CommandLine = Basep8BitStringToStaticUnicodeString(lpCommandLine); - } - else - { - /* Use a dynamic version */ - Basep8BitStringToDynamicUnicodeString(&LiveCommandLine, - lpCommandLine); - } + Basep8BitStringToDynamicUnicodeString(&CommandLine, + lpCommandLine); } - else - { - /* The logic below will use CommandLine, so we must make it valid */ - CommandLine = &DummyString; - } /* Convert the Name and Directory */ if (lpApplicationName) @@ -4740,8 +4721,7 @@ /* Call the Unicode function */ bRetVal = CreateProcessInternalW(hToken, ApplicationName.Buffer, - LiveCommandLine.Buffer ? - LiveCommandLine.Buffer : CommandLine->Buffer, + CommandLine.Buffer, lpProcessAttributes, lpThreadAttributes, bInheritHandles, @@ -4754,7 +4734,7 @@ /* Clean up */ RtlFreeUnicodeString(&ApplicationName); - RtlFreeUnicodeString(&LiveCommandLine); + RtlFreeUnicodeString(&CommandLine); RtlFreeUnicodeString(&CurrentDirectory); RtlFreeHeap(RtlGetProcessHeap(), 0, StartupInfo.lpDesktop); RtlFreeHeap(RtlGetProcessHeap(), 0, StartupInfo.lpReserved);