Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version
Go to top

Drivers Installation With WiX

, , 20 Nov 2009
This article is devoted to the methods of the driver packages installation/uninstallation using WiX.
DriverInstallationSample.zip
Sample
Sample
DPInst
x32
DPInst.exe
x64
DPInst.exe
Drivers
Common
Signed_driver
driver1.cat
driver1.inf
driver1.sys
Unsigned_driver
driver2.inf
driver2.sys
MSI
1
sample1.msi
2
sample2.msi
Scripts
setup.wxs
function CreateRestorePoint(name, type, event)
{
    try
    {
        var srObject = GetObject("winmgmts:\\\\.\\root\\default:Systemrestore");
        if (srObject == null)
        {
            //Cannot get System Restore service WMI object
            return 0;
        }
        var srStatus = srObject.CreateRestorePoint(name, type, event);
        return srStatus;
    }
    catch (e)
    {
        //Exception during the restore point creation
        return -1;
    }
}

function BeginDriverInstallation()
{
    var srPointName = "Drivers Installation";
    var DEVICE_DRIVER_INSTALL = 10;
    var BEGIN_NESTED_SYSTEM_CHANGE = 102;
    CreateRestorePoint(srPointName, DEVICE_DRIVER_INSTALL, BEGIN_NESTED_SYSTEM_CHANGE);
    return 0;
}

function EndDriverInstallation()
{
    var srPointName = "Drivers Installation";
    var DEVICE_DRIVER_INSTALL = 10;
    var END_NESTED_SYSTEM_CHANGE = 103;
    CreateRestorePoint(srPointName, DEVICE_DRIVER_INSTALL, END_NESTED_SYSTEM_CHANGE);
    return 0;
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Authors

Yuri Maxutenko
Software Developer (Junior) ApriorIT Inc.
Ukraine Ukraine
No Biography provided

Apriorit Inc
Apriorit Inc.
Ukraine Ukraine
ApriorIT is a Software Research and Development company that works in advanced knowledge-intensive scopes.
 
Company offers integrated research&development services for the software projects in such directions as Corporate Security, Remote Control, Mobile Development, Embedded Systems, Virtualization, Drivers and others.
 
Official site http://www.apriorit.com
Group type: Organisation

31 members

Follow on   LinkedIn

| Advertise | Privacy | Mobile
Web02 | 2.8.140916.1 | Last Updated 20 Nov 2009
Article Copyright 2009 by Yuri Maxutenko, Apriorit Inc
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid