Description of supplied installer:
The installation packages currently shipped (x86/x64) are constructed of several layers:
Inno Set-up Wrapper:
This executable includes all the files needed for installation of vJoy device driver on both (x86/x64) environments. When executed the relevant files are extracted to a folder, a vJoy entry that includes an un-installer, is added to the system menu and vJoyInstall is called to perform the installation. This file created by inno Setup from a script that is part of the code database (look for file vJoyInstallerSigned.iss).
vJoy Driver Files
These are files that are required by the architecture for the driver to be installed properly. They consist of:
- vjoy.sys vJoy driver
- vjoy.inf Set-up information
- vjoy.cat Security catalogue (Created automatically during code build)
- hidkmdf.sys Filter driver for HID-KMDF interface (by Microsoft)
- WdfCoInstaller01005.dll WDF co-installer version 1.5 (by Microsoft)
- WUDFUpdate_01005.dll WDF Update to co-installer version 1.5 (by Microsoft)
This executable encapsulates the functionality of file vJoyInstall.dll - it is called by the wrapper to perform the actual installation of vJoy and writes the installation log to file vJoyInstall.log in the current directory. It is possible to use this file outside the wrapper as long as all vJoy Driver Files are present in the same folder.
Note: In the current version, the functionality of vJoyInstall.dll is statically linked to vJoyInstall.exe.
The vJoy Driver files are installed using an installer. The complex installation logic is within the Installation DLL (vJoyInstall.dll) that exposes the following set of interface functions:
/* Get the name of the .INF file */ BOOL WINAPI get_inf_file(TCHAR * InfFile); /* Get the vJoy device Hardware ID */ BOOL WINAPI get_dev_hwid(TCHAR * DeviceHWID); /* Check if vJoy already installed */ BOOL WINAPI is_vjoy_installed(void); /* Repair the installed vJoy driver (Given the INF file and the Hardware ID) */ BOOL WINAPI repair(TCHAR * DeviceHWID, TCHAR * InfFile); /* Install vJoy driver (Given the INF file and the Hardware ID) */ int WINAPI installation(TCHAR * DeviceHWID, TCHAR * InfFile); /* Remove the installed vJoy driver (Given the INF file and the Hardware ID) There is an option to delete all related files from the system (DelInf=TRUE) */ int WINAPI removal(TCHAR * DeviceHWID, TCHAR * InfFile, BOOL DelInf); /* Enable the installed vJoy driver (Given the driver's Revision number) */ BOOL WINAPI enable(USHORT Revision) /* Disable the installed vJoy driver (Given the driver's Revision number) */ BOOL WINAPI disable(USHORT Revision)
There are additional interface files but you will probably won't need them.
The wrapper and vJoyInstall both create quite informative log files. The actual installation by the system append installation-related information to some system log files. These files are very informative though not easily deciphered.
The log file for the Inno Setup wrapper is called Setup Log 2011-11-01 #xxx.txt and is located under %TEMP% folder. (xxx can be any number in the range 001-999).
In addition to logging the actions of the set-up, the file also holds information about the system, lists the files that were extracted and the folders that were created. Note that the file name includes the date of the installation and a serial number. It is quite possible that an installation process will result in two log files.
The log file generated by vJoyInstall.exe resides in the same folder. It is called vJoyInstall.log. It is a small text file that consists of a header and details about the steps of the installation.
Note: When the installation fails, the wrapper uninstalls and remove all vJoy related files including this file. To save the file please copy it to another location before pressing OK button on the failure message box.
During the installation process, Windows record the process on one or more files:
|Operating system||folder||File name|
|Vista and up||%WINDIR%\inf||setupapi.dev.log
Analysing these files is beyond the scope of this site. You may look for further information in the following articles:
How to Modify
You might want to modify the installer in order to change its appearance, to embed the installation process inside another installation process, to include additional utilities or to change the installation logic.
In most cases, modifying or abandoning the wrapper will be sufficient.Only in rare cases you will want to change file vJoyInstall.exe.
If you want to stick to Inno Setup you can just take the current script and make changes in it. The script is quite straight forward. It copies files to their destination, it make some changes in the registry and it has some logic, written in pidgin Pascal, that controls conditional installation.
If you want to move to another wrapper technology - make sure you understand what the current wrapper does - imitate it. This is also true when you want to merge the wrapper into another one.