1 /********************************** Module Header **********************************\
2 Module Name: ProjectInstaller.cs
3 Project: CSShellExtContextMenuHandler
4 Copyright (c) Microsoft Corporation.
6 The installer class defines the custom actions in the setup. We use the custom
7 actions to register and unregister the COM-visible classes in the current managed
10 This source is subject to the Microsoft Public License.
11 See http://www.microsoft.com/opensource/licenses.mspx#Ms-PL.
12 All other rights reserved.
14 THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
15 EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
16 MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
17 \***********************************************************************************/
19 #region Using directives
21 using System.Collections;
22 using System.ComponentModel;
23 using System.Runtime.InteropServices;
28 namespace Pithos.ShellExtensions
30 [RunInstaller(true), ComVisible(false)]
31 public partial class ProjectInstaller : System.Configuration.Install.Installer
33 public ProjectInstaller()
35 InitializeComponent();
38 public override void Install(IDictionary stateSaver)
40 base.Install(stateSaver);
42 // Call RegistrationServices.RegisterAssembly to register the classes in
43 // the current managed assembly to enable creation from COM.
44 RegistrationServices regService = new RegistrationServices();
45 regService.RegisterAssembly(
46 this.GetType().Assembly,
47 AssemblyRegistrationFlags.SetCodeBase);
50 public override void Uninstall(IDictionary savedState)
52 base.Uninstall(savedState);
54 // Call RegistrationServices.UnregisterAssembly to unregister the classes
55 // in the current managed assembly.
56 RegistrationServices regService = new RegistrationServices();
57 regService.UnregisterAssembly(this.GetType().Assembly);