CrypKey License Driver Setup ===================================================================== Note for driver 10017 =============================================== The new requirements for Microsoft driver checking of 64 bit drivers on install cause the install of this driver to take about 17 seconds instead of the previous 3 seconds or less. This is a one time install slowness that I hope will improve as their checking evolves. =============================================== The CrypKey License Driver is required for CrypKey operation on all Windows platforms. This setup package is designed so you can easily and transparently include it in your application's installer. This document contains: 1. Description of included files 2. How to Install/Uninstall 3. How the installer behaves 1. Files ======== Readme.txt - This file. SetupEx.EXE - The install program. CKS.EXE - A self-extracting zipfile containing 7 files. IMPORTANT! Do not extract the contents of CKS.exe! SetupEx.EXE requires the CKS.exe file be present as-is. 2. Instructions For Usage ========================= Usage: SetupEx.EXE [/S /U /F /D] Simply include SetupEx.EXE and CKS.EXE in your Installation script - lets assume Install Shield is being used. The script would make sure that both SetupEx.EXE and CKS.EXE are copied into the Install directory (i.e. the dir where the users program is being installed). After the files are copied, the InstallShield Script would call SetupEx.EXE. 2.1 Error Code Return SetupEx.EXE returns an error code if it runs into a problem. This code is returned in 2 ways: 1) In the process termination code, which can be read by the process that launched SETUPEX.EXE, if supported by your installer development tool. 2) The error code is also written in ASCII to the file SETUPEX.XCO at termination to for use by developement tools not supporting method #1. Some Installer programs are not able to receive the error code via either method. This is OK as processing of the error code optional, although CrypKey recommends you not use the /S switch if the error code is not processed. The possible errors reported are: // This error should not occur on an OS platform CrypKey currently supports // This usually indicates that the OS is Windows 95/98. NTDRVR_INSTALL_ERR_NOT_NT -1 // SetupEx.exe is being run from a remote drive. The CrypKey License Service // is not required on the computer that SetupEx.exe is being launched on. // // or a permissions error blocking the installation. NTDRVR_INSTALL_ERR_REMOTE_DRIVE -2 // These errors are more likely to be caused by a problem in your installer // or a permissions error blocking the installation. NTDRVR_INSTALL_ERR_CANNOT_COPY_FILE -3 NTDRVR_INSTALL_ERR_CANNOT_RUN_CKSETUP -4 NTDRVR_INSTALL_ERR_CKS_EXE_MISSING -5 NTDRVR_INSTALL_ERR_CANNOT_RUN_CKS_EXE -6 NTDRVR_INSTALL_ERR_MISSING_FILE -7 // This error usually occurs when the user does lacks permission to load // drivers, typically fixed by logging in as a local administrator or, // in Vista, launching Setup.Ex.exe using the Administrator account. NTDRVR_INSTALL_ERR_REG_COULD_NOT_OPEN_SERVICEMANAGER -8 // These errors are unlikely and should be reported to CrypKey Support. NTDRVR_INSTALL_ERR_REG_COULD_NOT_OPEN_SERVICE -9 NTDRVR_INSTALL_ERR_REG_COULD_NOT_REGISTER_DIRECTORY -10 NTDRVR_INSTALL_ERR_STARTSERVICE_COULD_NOT_OPEN_SERVICEMANAGER -11 NTDRVR_INSTALL_ERR_STARTSERVICE_COULD_NOT_OPEN_SERVICE -12 NTDRVR_INSTALL_ERR_STARTSERVICE_COULD_NOT_START_SERVICE -13 NTDRVR_INSTALL_ERR_STOPSERVICE_COULD_NOT_OPEN_SERVICEMANAGER -14 NTDRVR_INSTALL_ERR_STOPSERVICE_COULD_NOT_OPEN_SERVICE -15 NTDRVR_INSTALL_ERR_STOPSERVICE_COULD_NOT_STOP_SERVICE -16 // A -17 error is more a warning. Your install should simply note this and // strongly encourage the user to restart Windows at the end of the // install. CrypKey License Service will be ready after the reboot. This // normally occurs if the CrypKey License Service was already installed // and the kernel driver is being updated. // A -17 will also be reported if the /D switch was specified and this was // the last applications registered with the CrypKey License Service. // In the case of an uninstall the restart is still important as an attempt // to reinstall CrypKey License Service before a restart will fail. NTDRVR_INSTALL_ERR_REBOOT_NEEDED -17 2.2 Installing There are two ways to use this program. 2.2.1 Verbose Mode Usage: SetupEx.EXE SetupEx.EXE will report on-screen any errors it encounters. It will do complete checking, and install if it can, and return an error code if it can't. Note that although SetupEx The easiest strategy is to copy SetupEx.exe and CKS.exe into the directory where the file to be protected is being placed and then launch this copy of SetupEx.EXE. SetupEx.exe will determine if it is being run from a local directory as well as detecting if the OS is 32-bit or 64-bit. If the directory is not a local drive If there is a problem, it will report the problem to the user directly. Note that although SetupEx.exe is a console program the errors are reported to the user using a modal dialog box. This means that in verbose mode SetupEx.exe will block execution on an error waiting for user input. The one exception is that if run on Windows 95/98 SetupEx.exe will silently terminate without a error dialog box and without performing an installation. 2.2.2 Silent Mode Usage: SetupEx.EXE /S In this mode, SetupEx.EXE will not put any dialogs on the screen. It will do complete checking, and install if it can, and return an error code if it can't. Because it does not report any errors, it will be up to your install program to handle errors. Note that the REBOOT_NEEDED error is not an error but it is information that needs to be acted on. 2.2.3 Forced Install Usage: SetupEx.EXE /F The install will have no action if there is a driver with the same or a more recent date already installed. However, you can force an older driver to install by using the /F option. Normally, this is a NOT recommended action, and may disable CrypKey on the machine. 2.3 Uninstalling SetupEx.exe has the ability to do either partial and complete uninstalls. 2.3.1 Partial Uninstall Usage: SetupEx.EXE /D If there are other programs registered in the CrypKey License Service configuration the uninstall will only remove the directory SETUPEX.EXE is in from the configuration. If there are no other programs using the driver, the uninstall will stop the service, remove the files used by the CrypKey License Service, and notify the user via a model dialog box that restarting Windows is required. Note that it if the user does try to do another install before booting, and the service was removed, they will get an error -9: "Register Directory: Unable to open CrypKey License Service Reason: The specified service does not exist as an installed service" This error will go away after rebooting. 2.3.2 Forced Complete Uninstall Usage: SetupEx.EXE /U This will always stop the service, remove the CrypKey License Service files, and notify the user via a model dialog box of the requirement to restart Windows. The other applications registered with the CrypKey License Service, if any were, will remain so even after you re-install the CrypKey License Service using SetupEx.exe, after first restarting Windows. However until an install can be performed again these applications will not be able to use CrypKey authentication due to the lack of a functioning CrypKey License Service to serve them. Because of this it is recommended that /D be used in release versions, and /U be used for test purposes only. 2.3.3 Silent Uninstall Usage: SetupEx.EXE /D /S SetupEx.EXE /U /S You can prevent the restart required dialog box, or any error, being shown using the "silent mode". This functions the same as with an install. 3. Behavior of Operation ======================== The CrypKey License Service Install will install all necessary files, register the files for automatic startup on reboot, and start the driver. If the CrypKey License Service is already installed, the install will - only install components if they are newer - only require a reboot if newer components are installed - put up a dialog requesting a reboot if it is required - not put up a reboot dialog but give an error code if the /S parameter is used