c# - Struggling with MSI install (VS 2008) and installing service -


i want create install program app. app consist of 2 windows services (written in c# using vs 2008), , has 2 install types - server (which requires both services) , client (which requires 1). server service small, hand-written web server (on special port) app itself. client service hand-written web server (on different port) acts device driver locally attached fingerprint scanner.

in either case, shortcuts installed open web browser client service's url.

on install need ask user:

  1. if want install client or server (ideally use c# code have written determine if there server service installed elsewhere on network, , hint want client install if so).
  2. if want shortcut on desktop (as in programs).
  3. if want web browser started automatically on machine startup.
  4. if want web browser start full screen (aka kiosk mode).
  5. if installing server version, whether want data in subfolder of program folder, rather in standard program data folder.

to start with, used vs 2008 create msi install project. however, has several shortcomings:

  • there doesn't seem way install web shortcuts, rather shortcuts exe installed.
  • there doesn't seem way install services.
  • there doesn't seem way set permissions on folders (e.g. network service user need write access database server install).
  • there doesn't seem way update firewall rules (to allow services listen on ports).
  • there doesn't seem way stop existing services before trying overwrite exe files on upgrade install (and start them again afterwards).
  • the install not seem remember settings used last time, users muddle, , choose wrong settings when upgrading.
  • there problems upgrade installs, in if 1 or more of original files installed have been modified since original install, upgrade installs not seem overwrite them new version. or, @ least, explanation come of observed behaviour.

so, initially, wrote c# exe program bulk of install - made msi installer merely install exe program, , zip file containing else. ran exe program, asked questions, unzipped required files zip, , did necessary.

however, subverting whole idea of having msi install!

i have been toying idea of converting exe program custom action dll, got stuck when wanted update progress bar , display progress messages in installer dialog (it appears googling not possible c# custom action?).

i not keen on learning whole new install language (i looked @ wix, example, seemed horrendously complicated), although persuaded if find suitable tutorial, relevant examples.

is there alternative c++ shim enable me call c# custom action dll install, , pass in handles necessary me control msi ui , progress bar?

or there better way produce install program?

yes, wix has learning curve.

most things want, can done in msi, either need msi knowledge or wix xml syntax knowledge or visual tool.

to truth, have overview different setup requirements, , yours not classify in lower end, beginner msi. can quite tricky until have ready, , unexpected traps/bugs fixed. if possible think asking msi knowledge initial project setting. or learning wix syntax examples.

otherwise: 1 thing can tasks quickly: don't need c++ shim call c#. either can work c# custom actions (look dtf / wix) maybe easier compile c# .exe , call custom action. directly possible in visual studio solution navigator dialogs.

here tasks of yours, can make sense call custom actions instead inherited msi logic

  • there doesn't seem way install services. (of course it's possible msi without ca, 1 argue better.)
  • set permissions on folders (same above)
  • there doesn't seem way update firewall (usually done custom action calls windows commands)
  • there doesn't seem way stop existing services (it is, can call ca too.)

you still need build more-featured msi rest or requirements ..

here web page commenting different setup freeware/shareware tools:

http://www.techsupportalert.com/content/best-free-setup-builder.htm

if want stay msi, maybe want take "advanced installer" (which has free version too) or "clickteam install creator"

from commercial tools besides marketleader not cheap installshield (besides le) there installaware, indigorose's msi factory , mentioned advancedinstaller.

i cannot compare them really, if want go commercial maybe take @ least @ last 2 mentioned.

msi factory 1 of wix-output editors sounds thing. can learn wix , have graphical starting point. knowledge no 1 of them has broadly accepted community, not expert here.


Comments