Archived: Why Do I Get Error 1406 "Could not write value VersionMinor (or VersionMajor) to HKEY_LOCAL_MACHINE..." When I Try Installing the Application I Built in LabVIEW 6.1?This document has been archived and is no longer updated by National Instruments
Primary Software Version: 6.1
Primary Software Fixed Version: N/A
Secondary Software: N/A
Problem: I built an application into an executable or a DLL and created an installer for it in LabVIEW 6.1. When I take this installer to any Windows machine and try installing it, I get an error 1406 which says "Could not write value VersionMinor (or VersionMajor) to HKEY_LOCAL_MACHINE..." and I get the option to abort the installation or ignore and coninue. When I select ignore, everything seems to install properly, but how can I get rid of the error?
I also tried building the same application in LabVIEW 6.0 or earlier, and I didn't get any errors when installing the program. Why does it seem to work on earlier versions of LabVIEW?
Solution: In LabVIEW 6.0, National Instruments (NI) created their own installer for LabVIEW's application builder. In LabVIEW 6.1, NI started using the Microsoft Installer for LabVIEW's application builder. There were many advantages to making this change, but the error we are discussing is one of the results of using the new installer.
This error happens when you use any non-numeric character in the product version of the application. The product version can be set in the application builder under the "Installer Settings" tab. After checking "Create Installer," you can set the product version under "Properties." When setting the product version, all numeric characters, and very few punctuation marks, are allowed. So product versions like 1.0 or 5.65 will work properly, but versions like "1.a" or "3.56 beta" won't. If you use a non-numeric character in the product version, the installer will generate error 1406 because it is trying to write this value to the registry in a format that wasn't originally intended.
Report Date: 08/21/2002
Last Updated: 12/07/2004
Document ID: 2OK8222G