Local WinPE testing
The repository includes helper scripts and local embedding support for testing the WinPE applications from a local development environment.
Publish helpers
The foundry/scripts directory includes:
Publish-FoundryConnect.ps1Publish-FoundryDeploy.ps1
These scripts publish self-contained single-file builds for:
win-x64win-arm64
Local override flow
The repository also includes Enable-LocalWinPeDeploy.ps1, which is intended for local development workflows where the desktop app should embed or reference local WinPE application builds instead of normal release assets.
What the helper script actually sets
When you run Enable-LocalWinPeDeploy.ps1, it enables both local runtime overrides and sets the project paths that Foundry uses later during media staging:
FOUNDRY_WINPE_LOCAL_CONNECT=1FOUNDRY_WINPE_LOCAL_CONNECT_PROJECT=<repo>\\src\\Foundry.Connect\\Foundry.Connect.csprojFOUNDRY_WINPE_LOCAL_DEPLOY=1FOUNDRY_WINPE_LOCAL_DEPLOY_PROJECT=<repo>\\src\\Foundry.Deploy\\Foundry.Deploy.csproj
If you also provide archive paths, the script sets these optional overrides:
FOUNDRY_WINPE_LOCAL_CONNECT_ARCHIVEFOUNDRY_WINPE_LOCAL_DEPLOY_ARCHIVE
That means local testing can be driven from project builds, from prebuilt archives, or from a mix of both.
Script inputs
Enable-LocalWinPeDeploy.ps1 supports these parameters:
-ArchivePathto reuse the same archive path for deploy when a deploy-specific path is not provided-ConnectArchivePathfor a specificFoundry.Connectarchive-DeployArchivePathfor a specificFoundry.Deployarchive-RunFoundryto launch the desktop app after the environment variables are set
This helper does not change the normal release workflow. It only changes how the current shell session prepares local WinPE payloads for development and validation.
Why this matters
This local flow is useful when you are changing:
Foundry.ConnectFoundry.Deploy- The WinPE bootstrap behavior
- The media staging logic in
Foundry
Scope of the local flow
The local override path exists for development and validation. It is not the normal end-user workflow and should not be confused with the standard release-based media creation path.
Add a capture of the terminal after Enable-LocalWinPeDeploy.ps1 runs, with the local override environment variables visible.