Example #1
0
        /// <summary>
        /// Installs the registry key.
        /// </summary>
        /// <param name="state">The installer state.</param>
        public override void Install(IDictionary state)
        {
            base.Install(state);

            // Add the LILLTEK_SDK and LILLTEK_SDKBIN environment variables.

            using (RegKey key = RegKey.Create(@"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment"))
            {
                key.Set("LILLTEK_SDK", sdkFolder);
            }

            using (RegKey key = RegKey.Create(@"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment"))
            {
                key.Set("LILLTEK_BIN", binFolder);
            }

            // Add the path to the LillTek SDK Bin folder to the registry so that Visual Studio
            // and other tools will be able to find the assemblies.

            using (RegKey key = RegKey.Create(@"HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework\AssemblyFolders\LillTek Platform"))
            {
                key.Set("", binFolder);
            }

            using (RegKey key = RegKey.Create(@"HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\8.0\AssemblyFolders\LillTek Platform"))
            {
                key.Set("", binFolder);
            }

            using (RegKey key = RegKey.Create(@"HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\8.0Exp\AssemblyFolders\LillTek Platform"))
            {
                key.Set("", binFolder);
            }

            // Display the restart message.

            MessageBox.Show("Please restart Windows after setup completes.", "LillTek Platform Setup", MessageBoxButtons.OK);
        }