crazytroy / eventlog-to-syslog

Automatically exported from code.google.com/p/eventlog-to-syslog
0 stars 0 forks source link

Distribute files in an MSI package #33

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
It would be great to have evtsys packaged as a MSI files instead of .zip-files, 
so that it could be more easily be distributed via standard Windows software 
deployment tools (such as SCCM).

Original issue reported on code.google.com by troels.a...@gmail.com on 12 Apr 2011 at 12:59

GoogleCodeExporter commented 8 years ago
This may be possible in the future once I finally switch the product over to 
Visual Studio. For now most users rely on scripting for mass deployment.

Original comment by sherwin....@gmail.com on 13 Apr 2011 at 4:08

GoogleCodeExporter commented 8 years ago
I have no experiences creating Windows software packages, but it sounds like 
http://wix.sourceforge.net/ would be able to help creating MSI packages - no 
matter what compiler is being used for the binaries.

Original comment by troels.a...@gmail.com on 13 Apr 2011 at 8:04

GoogleCodeExporter commented 8 years ago
I have heard of wix, but never used it myself. I may look into it in the 
future, although for now using VS will probably be the quickest and easiest 
method.

Original comment by sherwin....@gmail.com on 15 Apr 2011 at 2:49

GoogleCodeExporter commented 8 years ago
We were facing the same problem, so I created this WiX source file as a 
starting point (see attached file, tested on Windows 2008 R2 only).
On install it will place the 2 binaries in system32, install the service and 
start the service.
On uninstall it will stop the service, remove the service, remove the 2 
binaries, evtsys.cfg and remove registry keys.

It has some issues:
1) I'm not happy with the way the services gets installed and started, but it 
gets the job done.
2) 64bit only
3) Update to a newer version is untested. In our case we will always uninstall 
(this will remove your configuration from the registry!) and install the new 
version.

In the wxs file, replace LOGSERVER with your correct server and it will 
configure on install time.

Creating the MSI is done by running:
candle.exe evtsys.wxs
light.exe evtsys.wixobj

Original comment by roman.mu...@gmail.com on 3 Aug 2011 at 8:41

Attachments:

GoogleCodeExporter commented 8 years ago
To have the LOGSERVER value be able to be changed during install, surround it 
with []'s. So:
   ExeCommand='-i -h LOGSERVER'
becomes:
   ExeCommand='-i -h [LOGSERVER]'

Then specify the value on the command-line during install:
   msiexec.exe /i x:\some\path\evtsys.msi LOGSERVER=foo

Original comment by nathan.s...@gmail.com on 24 Oct 2011 at 8:40

GoogleCodeExporter commented 8 years ago
Thanks a ton for the help, Nathan!

Also, to get this working with both 32 & 64 bit, just straight up delete any 
references to 64-bit from Roman's evtsys.wxs. Then call candle.exe with or 
without the flag '-arch x64' to make 32 or 64 bit builds, respectively.

Original comment by dei...@gmail.com on 24 Oct 2011 at 9:55

GoogleCodeExporter commented 8 years ago
I made an atempt to produce working msi package for both 32 and 64 versions 
which I will be able to use in office to unatended installation on multiple 
machines. This was my first contact with WiX, but I must say it's quite nice. 
Result is attached. The main diffrences in compare to previous one are:

- Use standard ServiceInstall without CustomCommand for installing the service
- Accept all options used by service and write it down in to registry before 
initial startup (use LOGHOST=x.x.x.x in the msiexec) 
- Checks the admin privilages before atempt to install service

You can use following command to build both 32 and 64 bit versions

candle -arch x64 -dPlatform=x64 -o Evtsys-x64.wixobj Evtsys.wxs
candle -arch x86 -dPlatform=x86 -o Evtsys-x86.wixobj Evtsys.wxs
light -ext WixUtilExtension Evtsys-x64.wixobj
light -ext WixUtilExtension  Evtsys-x86.wixobj

Original comment by morgo...@gmail.com on 9 Jun 2012 at 1:46

Attachments: