mirror of
https://github.com/reactos/reactos.git
synced 2026-05-23 07:40:09 +08:00
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).