Click here to Skip to main content
15,906,645 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to figure out whether an enum is defined in an assembly. Pin
0x3c04-Jun-09 1:43
0x3c04-Jun-09 1:43 
AnswerRe: How to figure out whether an enum is defined in an assembly. Pin
S. Senthil Kumar4-Jun-09 2:15
S. Senthil Kumar4-Jun-09 2:15 
GeneralRe: How to figure out whether an enum is defined in an assembly. Pin
_AnsHUMAN_ 4-Jun-09 20:11
_AnsHUMAN_ 4-Jun-09 20:11 
GeneralRe: How to figure out whether an enum is defined in an assembly. Pin
S. Senthil Kumar4-Jun-09 20:41
S. Senthil Kumar4-Jun-09 20:41 
QuestionOracle connection problem in C# Pin
mariamkhaqan3-Jun-09 21:59
mariamkhaqan3-Jun-09 21:59 
Questionhelp Pin
Rajdeep.NET3-Jun-09 21:50
Rajdeep.NET3-Jun-09 21:50 
AnswerRe: help [modified] Pin
musefan3-Jun-09 21:51
musefan3-Jun-09 21:51 
GeneralRe: help Pin
0x3c03-Jun-09 22:01
0x3c03-Jun-09 22:01 
GeneralRe: help Pin
musefan3-Jun-09 22:04
musefan3-Jun-09 22:04 
GeneralRe: help Pin
Rajdeep.NET3-Jun-09 22:31
Rajdeep.NET3-Jun-09 22:31 
GeneralRe: help Pin
musefan3-Jun-09 22:35
musefan3-Jun-09 22:35 
GeneralRe: help Pin
0x3c03-Jun-09 22:35
0x3c03-Jun-09 22:35 
Questionwant to allow the user to enter ' but shows error Pin
Mehul_qaz3-Jun-09 21:15
Mehul_qaz3-Jun-09 21:15 
AnswerRe: want to allow the user to enter ' but shows error Pin
Blue_Boy3-Jun-09 21:26
Blue_Boy3-Jun-09 21:26 
GeneralRe: want to allow the user to enter ' but shows error Pin
Guffa3-Jun-09 21:55
Guffa3-Jun-09 21:55 
GeneralRe: want to allow the user to enter ' but shows error Pin
Blue_Boy5-Jun-09 1:33
Blue_Boy5-Jun-09 1:33 
AnswerRe: want to allow the user to enter ' but shows error Pin
Guffa3-Jun-09 21:52
Guffa3-Jun-09 21:52 
AnswerRe: want to allow the user to enter ' but shows error Pin
musefan3-Jun-09 21:56
musefan3-Jun-09 21:56 
QuestionAdvanced ToolTip. Pin
bsaksida3-Jun-09 20:40
bsaksida3-Jun-09 20:40 
AnswerRe: Advanced ToolTip. Pin
0x3c03-Jun-09 21:42
0x3c03-Jun-09 21:42 
QuestionError in Page.RegisterClientScriptBlock Pin
Murtuza Husain Miyan Patel3-Jun-09 20:39
professionalMurtuza Husain Miyan Patel3-Jun-09 20:39 
QuestionProblem in UnInstalling a BHO setup? Pin
svt gdwl3-Jun-09 20:24
svt gdwl3-Jun-09 20:24 
I had a BHO appliaction (in-process dll injected in IE) which was developed in Vs2005 c#.

I had made an msi setup with the help of Setup and Deployment Project.
This was the installer class I had added in my project which generates the required dll...

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration.Install;
using Microsoft.Win32;
using System.IO;


namespace BHOPDF
{
    [RunInstaller(true)]
    public partial class Installer1 : Installer
    {
        public Installer1()
        {
            InitializeComponent();
        }

       [System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Demand)]
        public override void Commit(System.Collections.IDictionary savedState)
        {
                base.Commit(savedState);
        }



        [System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Demand)]
        public override void Install(System.Collections.IDictionary stateSaver)
        {
            base.Install(stateSaver);
        }
      
       
        [System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Demand)]
        protected override void OnCommitting(System.Collections.IDictionary savedState)
        {
            // Get the location of regasm
            string regasmPath = System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory() + @"regasm.exe";
            // Get the location of our DLL
            string componentPath = typeof(Installer1).Assembly.Location;
              // Execute regasm
            System.Diagnostics.Process.Start(regasmPath, "/codebase \"" + componentPath + "\"");
            base.OnCommitting(savedState);
        }

    
       
        [System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Demand)]
        protected override void OnAfterInstall(System.Collections.IDictionary savedState)
        {
            base.OnAfterInstall(savedState);
        }

     
       
        [System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Demand)]
        protected override void OnBeforeUninstall(System.Collections.IDictionary savedState)
        {   string regasmPath = System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory() + @"regasm.exe";
            // Get the location of our DLL
            string componentPath = typeof(Installer1).Assembly.Location;
            // Execute regasm
            System.Diagnostics.Process.Start(regasmPath, "/u \"" + componentPath + "\"");
          
            base.OnBeforeUninstall(savedState);

        }

       
       
        [System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Demand)]
        public override void Uninstall(System.Collections.IDictionary savedState)
        {
         
            base.Uninstall(savedState);
        }

    }
}



The problem is after I uninstall my setup, and If I check the registry
"Software\Microsoft\Windows\CurrentVersion\Explorer\Browser Helper Objects"
my dll gets un-injected.

After uninstalling, and after sometime, If I check the registry again there my dll is visible as injected. How this is happened?

What was the mistake in the code, can anyone suggest something to solve this?
QuestionDatagridview delete problem Pin
half-life3-Jun-09 20:03
half-life3-Jun-09 20:03 
AnswerRe: Datagridview delete problem Pin
bsaksida3-Jun-09 20:54
bsaksida3-Jun-09 20:54 
GeneralRe: Datagridview delete problem Pin
half-life3-Jun-09 21:03
half-life3-Jun-09 21:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.