1

I am using Visual Studio 2010 to create an .MSI installer.

When I build the .MSI and "install" it, everything "appears" to work, except that it always installs everything in the root directory of the C: drive, no matter what I choose in the initial dialog.

I am at my wits end. If there is an "error" encountered by the installer, I can I find out what it is?

leppie
  • 115,091
  • 17
  • 196
  • 297
Paul Hollingsworth
  • 13,124
  • 12
  • 51
  • 68

3 Answers3

1

You can start by logging your installer. Windows Installer has a Directory table and a process called costing that resolves these entries to file paths. When this process goes wrong a directory will typically default to the root of your largest drive.

I'd have to look at your installer, test it on a VM and read the logfile to give you a more exact answer.

Christopher Painter
  • 54,556
  • 6
  • 63
  • 100
  • Agree, I suggested Wix though. With so much developer experience that will be easier and more reliable for him don't you think? Paul: the Directory table is a "pig's ear" (self referencing) relational table with directory entries and pointers to their parent directory: http://msdn.microsoft.com/en-us/library/aa368295(v=vs.85).aspx. As Chris says, if the chain of pointers to the parent directory is broken somewhere, the whole table is not resolved properly. In Wix you code your directory structure "physically" as part of your XML-style code. Much more intuitive, and rock solid. – Stein Åsmul Mar 29 '14 at 05:27
  • I was just trying to answer the question. Typically someone with so much "developer experience" using VDPROJ doesn't want to hear my well thought opinion that VDPROJ sucks and that they need to learn a lot more about the underlying Windows Installer so I get tired of telling them. – Christopher Painter Mar 29 '14 at 10:27
  • Yeah, I gathered - but we must not cease in ze fight fur better deployment :-). VDPROJ are so bad they really should not be used at all - totally agree. – Stein Åsmul Mar 29 '14 at 13:26
  • Actually, occasionally I use them. :) http://blog.iswix.com/2011/03/redemption-of-visual-studio-deployment.html – Christopher Painter Mar 29 '14 at 13:33
  • It'll most likely be the privilege issue I described. This comes up in the MSDN ClickOnce and Setup Projects forum a lot. – PhilDW Mar 29 '14 at 20:39
0

I suspect this happens when a limited user tries to install a per machine (Everyone) install. The user isn't admin, so it turns into a per-user (Just me) install going to those directories.

PhilDW
  • 20,260
  • 1
  • 18
  • 28
0

Judging from your profile page I'd say you are better off trying out WIX to create your setup. Most developers find this tool much more intuitive than other ways to create setups, though there is a bit of a learning curve. It's XML based and compile to MSI binaries. I suggest this because Visual Studio installer projects are extremely primitive and error prone.

Here is a quick, sample based tour that I think makes it easy to get started quickly: http://www.codeproject.com/Tips/105638/A-quick-introduction-Create-an-MSI-installer-with .

Here is an online tutorial: http://wix.tramontana.co.hu/

Wix is really hands-on, and you get a lot done quickly by understanding a few examples. See my answer in this thread for a few links on how to create upgrades: Wix generate single component id for entire tree

Chris Painter (who incidentally also answered your question above) has made a Wix tool called ISWix that might help you make a Wix installer quickly: https://iswix.codeplex.com/

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