A free Windows-compatible Operating System - mirrored from GitHub
Go to file
Hermès Bélusca-Maïto 4929d8ddb8
[BOOTDATA] Add missing quotes around %1 for the 'cplfile' Control_RunDLL command line.
Suppose you copy a CPL file (e.g. console.dll renamed into console.cpl)
into a path containing spaces, for example into the Desktop:

  C:\Documents and Settings\Administrator\Desktop\console.cpl

If the shell registry value for the "open" action of 'cplfile' does not
contain quotes around %1, then the Control_RunDLL function will attempt
to load "C:\Documents" as a file, which of course does not exist.

(NOTE: Missing in ReactOS: Doing a PathFindOnPath() or a PathFileExists()
call to verify that the file actually exists, instead of blindly trying
to run it and failing later in kernel32!LoadExecuteExW ...)

Adding quotes around the %1 fixes this and the correct file is being
loaded.

This behaviour has been confirmed to exist e.g. on Windows Server 2003
too (and is thus *NOT* a bug in ReactOS/Wine's Control_RunDLL
implementation).

----------------------

How to confirm this behaviour, in Win2k3 x86:

1. Start Win2k3 in debug mode under WinDbg. Ensure you have the debug
   symbols available.

2. Once loaded, break into the debugger, attach context to explorer.exe,
   and enter the magical :) single WinDbg command (all in one line, with
   **NO inserted newlines!!**):

bp shell32!CPL_RunMeBaby ".echo \"CPL CmdLine:\"; ?? (wchar_t*)*(void**)(@esp+12);
  bp SHLWAPI!PathIsFileSpecW \".echo \\\"CPL Path:\\\"; ?? (wchar_t*)*(void**)(@esp+4);
  bc \\\"SHLWAPI!PathIsFileSpecW\\\"; g;\"; g"

(Explanation:
a breakpoint is placed in the internal shell32!CPL_RunMeBaby function.
When the bp is hit, it runs the large WinDbg command inside the quotes.
This command echoes an informative line, then dumps the 3rd parameter
of the function on the stack that contains the CPL command-line.
It then adds a new breakpoint in SHLWAPI!PathIsFileSpecW, which is the
function that is being called *just after* the internal parsing of the
CPL command-line, and will verify whether the extracted CPL path does
exist. That new breakpoint in turn will run a WinDbg command that will:
(i) Display the CPL file path (1st-param of that new function), then
(ii) Clear that breakpoint.  Finally, automatic continuation ensues.)

3. On vanilla Win2k3, whose 'cplfile' "open" action does contain the
   quotes around %1:
     rundll32.exe shell32.dll,Control_RunDLL "%1",%*

   you will observe the following:

CPL CmdLine:
wchar_t * 0x00094e30
 ""C:\Documents and Settings\Administrator\Desktop\console.cpl","
CPL Path:
wchar_t * 0x0007f898
 "C:\Documents and Settings\Administrator\Desktop\console.cpl"

Notice the extra pair of quotes around the CPL filename in the CmdLine.

4. When modifying the 'cplfile' "open" action by *removing* the quotes
   around %1, you will instead see the following, thereby confirming
   the behaviour, which is now identical to what used to happen in ROS:

CPL CmdLine:
wchar_t * 0x00094e30
 "C:\Documents and Settings\Administrator\Desktop\console.cpl,"
CPL Path:
wchar_t * 0x0007f898
 "C:\Documents"

Due to the (now) absence of quotes around %1, the command-line gets
wrongly parsed and the extracted file path is incorrect.
2022-01-30 03:51:33 +01:00
.github [GITHUB] Applications, CPL, and rosapps modules are building for ARM now 2021-11-17 19:18:18 +03:00
.theia [GITPOD]Add gitpod config 2020-04-02 18:03:18 +02:00
base [3DTEXT] Rearrange settings dialog window to look nicer (#4263) 2022-01-27 20:12:25 +09:00
boot [BOOTDATA] Add missing quotes around %1 for the 'cplfile' Control_RunDLL command line. 2022-01-30 03:51:33 +01:00
dll [INCLUDE] Rename <ddk/imm.h> as <ddk/immdev.h> (#4321) 2022-01-30 09:38:04 +09:00
drivers [BLUE][CONSRV][USETUP] Completely remove support for CAB font extraction from driver, and move it to CONSRV, much like what was done for USETUP. 2022-01-15 17:41:36 +01:00
hal [HALX86] HalpDmaAllocateChildAdapter(): Fix memory leak, on error (#4156) 2021-12-20 21:14:36 +01:00
media [TRANSLATION] Cumulative update for Russian (ru-RU) translation 2022-01-18 23:42:06 +03:00
modules [INCLUDE] Rename <ddk/imm.h> as <ddk/immdev.h> (#4321) 2022-01-30 09:38:04 +09:00
ntoskrnl [NTOS:KE] Remove all checks for x87 not being present 2022-01-25 02:12:33 +03:00
sdk [INCLUDE] Rename <ddk/imm.h> as <ddk/immdev.h> (#4321) 2022-01-30 09:38:04 +09:00
subsystems [TRANSLATION] Update Chinese Traditional (zh-TW) translation (#4154) 2022-01-14 20:22:46 +03:00
win32ss [NTUSER] Implement GetSystemMetrics.SM_DBCSENABLED (#4317) 2022-01-30 11:23:22 +09:00
.clang-format [REACTOS] Introduce .clang-format file 2019-12-28 01:23:49 +02:00
.editorconfig Remove the 'end_of_line' value. Addendum to 32db19f6 - PR #2528 2020-04-11 17:56:23 +02:00
.gitattributes
.gitignore [GITIGNORE] Add compile_commands.json and .cache folder for clangd cache 2021-06-13 01:55:52 +03:00
.gitmessage [FORMATTING] Remove trailing whitespace. Addendum to 34593d93. 2021-09-13 03:52:22 +02:00
.gitpod.Dockerfile [GITPOD] change extract directory to automatically extract to RosBE, and set tar to verbose mode 2021-12-28 02:14:47 +03:00
.gitpod.yml [GITPOD]Add gitpod config 2020-04-02 18:03:18 +02:00
apistatus.lst
CMakeLists.txt [CMAKE] Remove __inline substitutions 2021-10-26 22:51:03 +03:00
CODE_OF_CONDUCT.md
CODEOWNERS [TRANSLATION] Add Hong Kong Chinese (zh-HK) translation - Part 1 (#3941) 2021-12-30 00:40:57 +03:00
configure.cmd [CONFIGURE] Add support for 'Visual Studio 2022, v17.x' 2021-11-20 12:14:32 +03:00
configure.sh [CONFIGURE] Make configure.sh print out an error when CMake fails 2021-08-02 01:40:43 +03:00
CONTRIBUTING.md [REACTOS] Remove some ending spaces 2020-04-24 02:32:05 +03:00
COPYING
COPYING.ARM [FORMATTING] Remove trailing whitespace. Addendum to 34593d93. 2021-09-13 03:52:22 +02:00
COPYING.LIB
COPYING3
COPYING3.LIB
CREDITS [CREDITS] Add myself to the credits document (#2747) 2020-05-07 12:39:44 +02:00
Doxyfile [DOXYGEN] Update Doxyfile for our build of Doxygen 1.8.15. 2019-01-15 09:37:54 +01:00
INSTALL [REACTOS] Remove some ending spaces 2020-04-24 02:32:05 +03:00
overrides-gcc.cmake [CMAKE] Clear CMAKE_<LANGUAGE>_IMPLICIT_LINK_LIBRARIES and 2019-04-06 17:43:38 +02:00
overrides-msvc.cmake CORE-14513 [CMAKE] Remove modules that are shipped with cmake (#575) 2018-08-19 22:01:31 +02:00
PreLoad.cmake
PULL_REQUEST_MANAGEMENT.md
README.md [README] Update release article link 2021-12-17 22:35:26 +03:00
toolchain-clang.cmake [CMAKE] toolchain-clang.cmake: Use overrides-gcc.cmake 2021-12-28 01:56:33 +03:00
toolchain-gcc.cmake [CMAKE] Cache compiler paths to make some utilities happy 2021-07-05 09:56:41 +02:00
toolchain-msvc.cmake [CMAKE] Fixes for clang-cl build 2021-09-14 17:58:23 +03:00

ReactOS


ReactOS 0.4.14 Release Download ReactOS SourceForge Download License Donate Follow on Twitter

WebsiteOfficial chatWikiForumJIRA Bug TrackerReactOS Git mirrorTestman

What is ReactOS?

ReactOS™ is an Open Source effort to develop a quality operating system that is compatible with applications and drivers written for the Microsoft® Windows™ NT family of operating systems (NT4, 2000, XP, 2003, Vista, 7).

The ReactOS project, although currently focused on Windows Server 2003 compatibility, is always keeping an eye toward compatibility with Windows Vista and future Windows NT releases.

The code of ReactOS is licensed under GNU GPL 2.0.

Product quality warning

ReactOS is currently an Alpha quality operating system. This means that ReactOS is under heavy development and you have to be ready to encounter some problems. Different things may not work well and it can corrupt the data present on your hard disk. It is HIGHLY recommended to test ReactOS on a virtual machine or on a computer with no sensitive or critical data!

Building

Build rosbewin.badge rosbeunix.badge coverity.badge

To build the system it is strongly advised to use the ReactOS Build Environment (RosBE). Up-to-date versions for Windows and for Unix/GNU-Linux are available from our download page at: "Build Environment".

Alternatively one can use Microsoft Visual C++ (MSVC) version 2015+. Building with MSVC is covered here: "Visual Studio or Microsoft Visual C++".

See "Building ReactOS" article for more details.

Binaries

To build ReactOS you must run the configure script in the directory you want to have your build files. Choose configure.cmd or configure.sh depending on your system. Then run ninja <modulename> to build a module you want or just ninja to build all modules.

Bootable images

To build a bootable CD image run ninja bootcd from the build directory. This will create a CD image with a filename bootcd.iso.

You can always download fresh binary builds of bootable images from the "Daily builds" page.

Installing

By default, ReactOS currently can only be installed on a machine that has a FAT16 or FAT32 partition as the active (bootable) partition. The partition on which ReactOS is to be installed (which may or may not be the bootable partition) must also be formatted as FAT16 or FAT32. ReactOS Setup can format the partitions if needed.

Starting with 0.4.10, ReactOS can be installed using the BtrFS file system. But consider this as an experimental feature and thus regressions not triggered on FAT setup may be observed.

To install ReactOS from the bootable CD distribution, extract the archive contents. Then burn the CD image, boot from it, and follow the instructions.

See "Installing ReactOS" Wiki page or INSTALL for more details.

Testing

If you discover a bug in ReactOS search on JIRA first - it might be reported already. If not report the bug providing logs and as much information as possible.

See "File Bugs" for a guide.

NOTE: The bug tracker is not for discussions. Please use our official chat or our forum.

Contributing prwelcome.badge

We are always looking for developers! Check how to contribute if you are willing to participate.

Legal notice: If you have seen proprietary Microsoft Windows source code (including but not limited to the leaked Windows NT 3.5, NT 4, 2000 source code and the Windows Research Kernel), your contribution won't be accepted because of potential copyright violation.

Try out cloud-based ReactOS development using Gitpod and Docker:

Open in Gitpod

You can also support ReactOS by donating! We rely on our backers to maintain our servers and accelerate development by hiring full-time devs.

More information

ReactOS is a Free and Open Source operating system based on the Windows architecture, providing support for existing applications and drivers, and an alternative to the current dominant consumer operating system.

It is not another wrapper built on Linux, like WINE. It does not attempt or plan to compete with WINE; in fact, the user-mode part of ReactOS is almost entirely WINE-based and our two teams have cooperated closely in the past.

ReactOS is also not "yet another OS". It does not attempt to be a third player like any other alternative OS out there. People are not meant to uninstall Linux and use ReactOS instead; ReactOS is a replacement for Windows users who want a Windows replacement that behaves just like Windows.

More information is available at: reactos.org.

Also see the media/doc subdirectory for some sparse notes.

Who is responsible

Active devs are listed as members of GitHub organization. See also the CREDITS file for others.

Code mirrors

The main development is done on GitHub. We have an alternative mirror in case GitHub is down.

There is also an obsolete SVN archive repository that is kept for historical purposes.