From 85f2a67a9e75a129e3cab2bd4a5f1f4a812c2bc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Wed, 13 May 2026 22:22:44 +0200 Subject: [PATCH] [BOOTDATA] Add an "Install ReactOS" shortcut to the Live environment desktop The shortcut spawns CMD.EXE in the background and runs a specific command-line that determines where the reactos.exe installer is: cmd.exe /D /E:ON /C "start %SystemDrive%\%PROCESSOR_ARCHITECTURE:x86=I386%\reactos.exe" An alternative could be: cmd.exe /D /C "for /F %f in ('"if %PROCESSOR_ARCHITECTURE%==x86 (echo I386) else (echo %PROCESSOR_ARCHITECTURE%)"') do start %SystemDrive%\%f\reactos.exe" (In this second case an exact value comparison is made, contrary to the first case where all instances of "x86" would be replaced.) The reason for using CMD.EXE, is that the `PROCESSOR_ARCHITECTURE` environment variable contains the "almost" correct value for the architecture directory name where reactos.exe can be found, except for the x86 case where `PROCESSOR_ARCHITECTURE` is set to "x86" (as on Windows) but the directory is named "I386" (as on Windows again). --- boot/bootdata/CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/boot/bootdata/CMakeLists.txt b/boot/bootdata/CMakeLists.txt index 7fe3b770ca2..1d9b2a15477 100644 --- a/boot/bootdata/CMakeLists.txt +++ b/boot/bootdata/CMakeLists.txt @@ -111,6 +111,15 @@ set(dir_startmenu_entertainment "${dir_startmenu_accessories}/Entertainment") set(dir_startmenu_systemtools "${dir_startmenu_accessories}/System Tools") set(dir_quicklaunch "Profiles/Default User/Application Data/Microsoft/Internet Explorer/Quick Launch") +cmdenvvar(envvar_systemdrive "SystemDrive" TRUE) +cmdenvvar(envvar_archdir "PROCESSOR_ARCHITECTURE:x86=I386" TRUE) +add_livecd_shortcut("Install ReactOS" + "shell:system\\cmd.exe" + CMDLINE_ARGS "/D /E:ON /C \"start ${envvar_systemdrive}\\${envvar_archdir}\\reactos.exe\"" + ICON "${envvar_systemroot}\\system32\\msiexec.exe" + MINIMIZE + DESTINATION "${dir_allusers_desktop}") + add_livecd_shortcut("Read Me" "shell:windows\\readme.txt" ICON "${envvar_systemroot}\\system32\\shell32.dll" ICON_INDEX -152