hi guys, i want to be able to have three different names for one program. to do that i can create two other setup projects and change the product name, but i dont feel like it is proper way of doing that. so i need to run setup project with a parameter to change the productname property. do you have any idea how to do that?

Dani AI

Generated

For the situation raised (avoiding three separate setup projects) and 's brief reply, practical options exist even though Visual Studio setup projects (.vdproj) do not accept a build-time ProductName parameter via MSBuild.

  • Scripted template: keep a single .vdproj template and run a small script (batch/PowerShell) that replaces the ProductName entry in the .vdproj before calling devenv.com /build. This automates what you did manually and keeps one source-of-truth in version control. Important: think about Windows Installer identity—if you want each branded installer to install as a distinct product on the same machine, ensure the MSI ProductCode (and possibly UpgradeCode) differ; if they are merely variants of the same product for upgrade scenarios, keep UpgradeCode stable and manage ProductCode/Version correctly.

  • Move to a real MSI tool (recommended long term): WiX supports preprocessor variables and MSBuild integration, letting you inject a ProductName at build time (for example by defining a variable and passing it to the build). That gives repeatable builds, CI-friendly parameterization, and full control of GUIDs and properties.

  • Post-build transform/edit: produce one MSI and create an MST that changes the Property table (ProductName) or edit the MSI programmatically. Apply the transform at install time: msiexec /i Product.msi TRANSFORMS=brandA.mst. This avoids rebuilding multiple MSIs but requires careful testing (ARP name caching, upgrade detection, etc.).

Summary: for a quick, low-effort fix, script text-replacement of the .vdproj and automate the devenv build. For maintainability and CI/branding scale, invest in WiX or another installer authoring tool that supports build-time variables. Always test upgrade/repair behavior after changing ProductName/ProductCode/UpgradeCode.

Recommended Answers

All 4 Replies

You can't. There's not way to do that.

You can't. There's not way to do that.

never say never, i will try to prove you wrong(upps this reminded me of some..)

i will try to prove you wrong(upps this reminded me of some..)

I know this quote reminds you of whom :p

You were right, i created seperate setup projects with different product names to achieve this.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.