1

I have a Visual studio Setup project. After MSI is built I apply transformation. It adds 2 rows to 'Upgrade' table (properties P1,P2)and modifies Property SecureCustomProperties from

PREVIOUSVERSIONSINSTALLED;NEWERPRODUCTFOUND

to

PREVIOUSVERSIONSINSTALLED;NEWERPRODUCTFOUND;P1;P2

How I can do it in VS Setup to avoid this transformation applying?

ZedZip
  • 5,794
  • 15
  • 66
  • 119
  • 2
    You can't avoid it. A typical answer is to di a post build step with a VBScript. The Windows SDK/Kit has some MSI VB scripts, one of which is WiRunSql.vbs. Give it the path to the MSI and the SQL and it will update your MSI. In your case you need a couple of Insert statement to do that. http://msdn.microsoft.com/en-us/library/aa372021(v=vs.85).aspx – PhilDW Nov 19 '14 at 18:56
  • I've done that. I've written scripts to clean up directory tables, reorder sequences, fix properties, fix shortcuts and so on and so on. That's a year of my life that I'll never get back. – Christopher Painter Nov 19 '14 at 19:33

2 Answers2

2

Honestly, truly, really - do spend the time to convert to Wix. See this similar post: Add remove programs show increased size after each REINSTALL of my msi product

Community
  • 1
  • 1
Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164
1

You can't avoid this using VS Setup. It's one of many design limitations of the tool. Either live with it through postbuild hacks or rewrite your installer using another tool such as WiX.

I maintain an open source project called IsWiX. This has project tempates and visual designers that make it easy to do such a task.

Christopher Painter
  • 54,556
  • 6
  • 63
  • 100
  • ok, will try it, thnx. Here 'visual designers' - it is designers for custom dialogs? – ZedZip Nov 20 '14 at 10:46
  • Sadly, no. That's a huge effort. The main visual designer is for component authoring aka "files and folders". The project templates does have a pattern for inserting a custom dialog by uncommenting one line of XML. But you have to write the XML by hand to insert controls into the body of the dialog. Email me if you want a free demonstration via screen sharing. – Christopher Painter Nov 20 '14 at 11:38