Clone
1
ProjectVars
Homes32 edited this page 2022-05-14 07:56:52 -05:00

PhoenixPE Global Variables

This is a list of PhoenixPE Global variables and their function.

Unless specified, they should not be modified, however you may reference them in your build.

Project Global Variables

Project variables define the build "environment" for PhonenixPE.

Variable Description
%Workbench% Workbench is the directory were the majority of the build "work" takes place. It acts as a container for other directories such as Cache, Temp, Target, etc.
%ProjectCache% The Project Cache is used by the core build scripts to cache things like WinRE.wim and registry hives in order to speed up subsequent builds.
%ProgramsCache% The Programs Cache stores downloaded programs. This is done to speed up building and save bandwidth.
%ProjectTemp% The Project Temp directory is used during build for temporary files.
%Tools% The Tools directory contains 3rd party tools and applications used during the build process.
%Shell% The name of the shell (Explorer/WinXShell/etc.). This variable is used by scripts to determine if any shell specific processing needs to be completed.

Target (Build) Global Variables

Target variables provide a convenient way to reference common directories during the build process.

Variable Description
%TargetDir% TargetDir is the directory where the WinPE build is constructed. This directory is eventually packed into Boot.wim.
%TargetWindows% The Windows directory of the WinPE environment.
%TargetSystem32% The System32 directory of the WinPE environment.
%TargetBootWim% The path to the final Boot.wim file.
%TargetPrograms% The Program Files directory of the WinPE environment. Contains any programs set to RunFromRam.
%PEPrograms% PEPrograms is a special variable used to represent the Program Files or Programs folder from within a running WinPE environment. It is used for creating shortcuts and referencing paths inside a running WinPE.
%TargetAppData% The user profile Roaming AppData directory Users\Default\AppData\Roaming of the WinPE environment.
%TargetLocalAppData% The user profile Local AppData directory Users\Default\AppData\Local of the WinPE environment.

Output Global Variables

These variables are set by by 'Config Source' script and define where the final build files will be placed.

Variable Description
%OutputDir% The directory that contains the final build, including Bootloaders, Programs, and Boot.wim before the ISO image is created.
%ISODir% The directory where the final ISO image will be created.
%ISOFile% The full path to the final ISO image.

Registry Global Variables

The registry variables are used to reference the various registry hives loaded during the build process.

They may be used in conjunctions with PEBakery's RegHiveLoad and RegHiveUnLoad commands to access and modify the WinPE registry.

Variable Description
%RegistryCache% The directory where registry hives will be cached to speed up subsequent builds.
%RegistrySoftwareSource% The .wim file from which the SOFTWARE registry hive will be extracted. (Boot.wim/Install.wim)
%RegistryDriversSource% The .wim file from which the DRIVERS registry hive will be extracted. (Boot.wim/Install.wim)
%RegSystem% The full path to the target PE's SYSTEM hive.
%RegSoftware% The full path to the target PE's SOFTWARE hive.
%RegDefault% The full path to the target PE's DEFAULT (HKCU\SOFTWARE) hive.
%RegComponents% The full path to the target PE's COMPONENTS hive.
%RegDrivers% The full path to the target PE's DRIVERS hive.
%RegInstallSystem% The full path to the source Install.wim SYSTEM hive.
%RegInstallSoftware% The full path to the source Install.wim SOFTWARE hive.
%RegInstallDefault% The full path to the source Install.wim DEFAULT (HKCU\SOFTWARE) hive.
%RegInstallComponents% The full path to the source Install.wim COMPONENTS hive.
%RegInstallDrivers% The full path to the source Install.wim DRIVERS hive.

Source Global Variables

Source variables are generated by the 'Config Source' script and contain information about the source windows environment used to build PhoneixPE.

Variable Description
%SourceDir% The directory containing the extracted or mounted Windows install files.
%SourceBaseWimName% The name of the base wim image (Boot.wim/WinRE.wim) used to build PhoenixPE. Used for determining what files/registry entries need to be processed.
%SourceBaseWim% The full path to the base wim image (Boot.wim/WinRE.wim) used to build PhoenixPE.
%SourceInstallWim% The full path to the Install.wim file used to add features and components to the base wim image.
%SourceBaseWimImage% The wim image for the Base image.
%SourceInstallWimImage% The wim image for the Install image.
%SourceArch% The architecture of the selected Windows image. x86 or x64
%SourceLang% The primary language of the selected Windows image.
%SourceFallbackLang% A pipe separated list of fallback languages used in case the primary translation is unavailable.
%SourceVer% The version of the selected Windows image.

Other Global Variables

Variable Description
%HostArch% The architecture of the Host computer. x86 or x64