Skip to content

Feature Request: Support setting Windows executable metadata (during or after build) #168

@chroberino

Description

@chroberino

I’d like to request support for setting Windows executable metadata (e.g. ProductVersion, FileVersion, CompanyName, etc.) either:

  • during the pkg build process (preferred)
  • or safely after build, e.g. using tools like rcedit, without breaking the generated binary

❌ Current Issue

When using rcedit to modify the .exe after building with pkg, the binary becomes corrupted and fails to run with:

Pkg: Error reading from file.

This seems to be caused by how pkg structures its executables, making post-build modifications unsafe. Unfortunately, this blocks all standard methods of adding or correcting metadata.

Related Issues in the original vercel/pkg

✅ Suggested Solutions

Ideal (during build)

Add a field in package.json or a CLI flag to set version metadata during the build process. For example:

"pkg": {
  "versionMetadata": {
    "ProductVersion": "6.5.0",
    "FileVersion": "6.5.0",
    "CompanyName": "my-company",
    "ProductName": "my-product"
  }
}

Alternative (after build)

Make the generated .exe compatible with post-build tools like rcedit, postject, etc. so users can safely inject version metadata after building.

📌 Why It Matters

Version metadata is essential for

  • displaying correct information in Windows Explorer
  • deployment and patching tools
  • digital code signing
  • QA/version tracking across systems

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions