Giter Site home page Giter Site logo

wix-wrapper's Introduction

WiX MSI Wrapper

About the code

This framework will allow one to 'wrap' an exe installer into an MSI for quick and easy deployment in a corporate environment.

This may reduce or negate the need for 'capture' apps, such as AppDeploy Repackager.

Using from source

Prerequisites

  • .Net environment (Native Windows, Mono, etc)
  • WiX Toolset

Package Information

Currently, nextcloud.wxs simply needs the indicated edits on lines 2-6, making the appropriate updates for .exe filename, package version, GUID (optional, see below).

If you wish to use your own custom GUIDs, GUIDs for each new installer version may be created via web tools. N.B. all GUIDs must be be in majuscule case.

Package creation may be done automatically: After ensuring that the WiX tools are in the Windows Path, simply run the make_installer.bat file. The script will automatically clear any artifacts from previous builds and generate a new MSI package.

Package creation may also be done manually: Using the standard WiX tools- first, candle *.wxs then light *.wixobj, and the MSI will be created.

Full MSI Creation Steps:

  1. Copy the official or custom built nextcloud.exe file into the project folder.
  2. Edit nextcloud.wxs lines 2-6 as necessary. Generally, only update version and filename.
  3. Run make_installer.bat, or run candle *.wxs, and light *.wixobj.
  4. Copy the newly created nextcloud.msi to an appropriate install location (AD server, Network share, etc.)
  5. Install the nextcloud.msi with any valid tool- Group Policy, Remote Admin commands, etc.

A note about GUIDs

WiX and Windows use Globally Unique Identifiers as a way to identify software installs and other 'products' that are stored on a Windows system. Because of the length and diversity of GUIDs, the chance of a GUID collision is near-zero. For general purpose projects, such as this, any common GUID generator may be used.

When generating an update for the WiX file, a single new GUID is needed on the indicated line. The GUID referring to the previous install must also be listed so that the installer can properly identify and remove the previous package. All GUIDs must be in majuscule (upper) case.

Also of note is a hard-coded GUID in nextcloud.wxs line 22. This hard-coded GUID can be used under the assumption that packages are deployed in such a method that the receiving computers have since been restarted and/or cleared the temporary file cache.

Contributing

Code

Any improvements are more than welcome. Please submit a pull request and I'll take a look.

Issues

If you run into bugs, or need assistance with the creation of the MSI package, please open a GitHub Issue.

License

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.

wix-wrapper's People

Contributors

tomswartz07 avatar trockenasche avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wix-wrapper's Issues

Build signed installer for OC

Great job on this. I have a question regarding signing the installer. We currently copy the mirall exe installer out of opensuse and sign it on a windows box before deployment (to avoid smart screen warnings). Would we still need to sign the exe before using your wrapper? Would we need to sign the resulting msi instead/as well as?

Please forgive my ignorance about Windows installers. I'm a *nix guy and while I use Windows regularly, I've never developed for that platform. Thanks so much for working on a solution to this issue with OC.

Unable to compile (warning CNDL1091 and error CNDL0027)

Hello, I am unable to "compile" the owncloud installer :/

C:\Users\crysman\Downloads>owncloud_make_installer.bat
C:\Users\crysman\Downloads>del owncloud.msi
Nelze najít C:\Users\crysman\Downloads\owncloud.msi.

C:\Users\crysman\Downloads>del owncloud.wixobj
Nelze najít C:\Users\crysman\Downloads\owncloud.wixobj.

C:\Users\crysman\Downloads>del owncloud.wixpdb
Nelze najít C:\Users\crysman\Downloads\owncloud.wixpdb.

C:\Users\crysman\Downloads>candle owncloud.wxs
Windows Installer XML Toolset Compiler version 3.9.1208.0
Copyright (c) Outercurve Foundation. All rights reserved.

owncloud.wxs
C:\Users\crysman\Downloads\owncloud.wxs(14) : warning CNDL1091 : The Package/@Id
attribute has been set.  Setting this attribute will allow nonidentical .msi fi
les to have the same package code.  This may be a problem because the package co
de is the primary identifier used by the installer to search for and validate th
e correct package for a given installation.  If a package is changed without cha
nging the package code, the installer may not use the newer package if both are
still accessible to the installer.  Please remove the Id attribute in order to a
utomatically generate a new package code for each new .msi file.
C:\Users\crysman\Downloads\owncloud.wxs(23) : error CNDL0027 : The File/@Name at
tribute's value, 'c:\users\crysman\downloads\ownCloudsetup.exe', is not a valid
long name because it contains illegal characters.  Legal long names contain no m
ore than 260 characters and must contain at least one non-period character.  Any
character except for the follow may be used: \ ? | > < : / * ".

C:\Users\crysman\Downloads>light owncloud.wixobj
light.exe : error LGHT0103 : The system cannot find the file 'owncloud.wixobj' w
ith type 'Source'.

Product GUID

Hi, i am looking to simplify the way a msi is created.

My first question is: the UpgradeCode, is it really used? If i wrap an exe, let's say, the vlc_installer.exe. The newly created msi will install VLC for me, but in the uninstall list of windows i can see VLC, which is normal, but not this msi. Is it self-uninstalling right after? Does that mean that i don't really need the GUIDs and i can auto-generate them?

I am looking to remove the upgrade portion, get rid of ProductUpgradeCode guid and autogenerate the ProductCode guid. I already did this and it seems to be working fine. Are there any risks i should worry about?

Thank you.

Use a more liberal license

Thank you for publishing this useful script. Would it be possible to re-license it under a more liberal license, such as the MIT License? Thanks in advance!

Need to create MSI package for Flexera ndtrack.exe

I need to create a MSI package for flexera agent in windows. I have few .dll files and ndtrack.exe. I tried modifying the nextcloud.wxs lines 2-6 and then ran make_installer.bat file. The msi is created but on double clicking, it doesnt work. How am I suppose to know if its really working or I ve missed including dll files in the package?

No desktop shortcut

Hello Tom, please, how to customize the wxs in order to NOT get shortcut on desktop after installation? In case of owncloud, owncloud shortcut on desktop is being placed on every user's desktop - I do not want that...

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.