ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/AnywhereTS-MSSQL/trunk/TSControlPanel/CPanel.Installer.cs
(Generate patch)

Comparing trunk/TSControlPanel/CPanel.Installer.cs (file contents):
Revision 166 by william, Mon Jul 16 10:34:12 2012 UTC vs.
Revision 167 by william, Mon Jul 16 10:40:55 2012 UTC

# Line 18 | Line 18 | namespace AnywhereTS
18          #region install
19          public override void Install(IDictionary stateSaver)
20          {
21 +            base.Install(stateSaver);
22 +            string path = this.Context.Parameters["targetdir"];
23 +            Logging.UpdateLogPath(string.Format(@"{0}\logs", path));
24              using (log4net.NDC.Push("Logged from TSControlPanel.Installer"))
25              {
26 <                CreateRegistryConfigKeys();
26 >                try
27 >                {
28 >                    CreateRegistryConfigKeys();
29 >                }
30 >                catch (Exception ex)
31 >                {
32 >                    using (log4net.NDC.Push(string.Format("{0}: MESSAGE={1}{2}Diagnostics:{2}{3}", ex.GetType().Name, ex.Message, System.Environment.NewLine, ex.ToString())))
33 >                    {
34 >                        Logging.TSControlPanelInstallerLog.Error("Install() failed.");
35 >                    }
36 >                    throw ex;
37 >                }
38              }
39          }
40          private void CreateRegistryConfigKeys()
# Line 63 | Line 77 | namespace AnywhereTS
77              {
78                  try
79                  {
80 +                    string path = this.Context.Parameters["targetdir"];                    
81 +                    Logging.UpdateLogPath(string.Format(@"{0}\logs", path));
82                      Logging.TSControlPanelInstallerLog.DebugFormat("Removing TSControlPanel Registry settings");
83                      Microsoft.Win32.RegistryKey key = null;
84                      if (IntPtr.Size == 8)
# Line 74 | Line 90 | namespace AnywhereTS
90                      else
91                      {   // 32 bit OS
92                          //strATSregRoot = @"SOFTWARE\" + ATSGlobals.ApplicationName + @"\ts-config";
93 <                        key = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(string.Format("Software\{0}\{1}", ATSGlobals.ApplicationName, "ts-config"), true);
93 >                        key = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(string.Format(@"Software\{0}\{1}", ATSGlobals.ApplicationName, "ts-config"), true);
94                          key.DeleteValue("ControlPanelVersion",false);
95                      }
96                      Logging.TSControlPanelInstallerLog.DebugFormat("Successfully removed TSControlPanel Registry settings");

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines