Click here to Skip to main content
15,887,485 members
Home / Discussions / C#
   

C#

 
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 
GeneralRe: Datagridview delete problem Pin
Mycroft Holmes3-Jun-09 22:18
professionalMycroft Holmes3-Jun-09 22:18 
GeneralRe: Datagridview delete problem Pin
half-life3-Jun-09 23:13
half-life3-Jun-09 23:13 
AnswerRe: Datagridview delete problem Pin
bsaksida4-Jun-09 6:54
bsaksida4-Jun-09 6:54 
GeneralRe: Datagridview delete problem Pin
half-life6-Jun-09 19:32
half-life6-Jun-09 19:32 
QuestionCharacter map Pin
dell2243-Jun-09 18:44
dell2243-Jun-09 18:44 
AnswerRe: Character map Pin
Anubhava Dimri13-Apr-11 19:27
Anubhava Dimri13-Apr-11 19:27 
QuestionDisabling back button of IE window using c# Pin
svt gdwl3-Jun-09 18:38
svt gdwl3-Jun-09 18:38 
AnswerRe: Disabling back button of IE window using c# Pin
Christian Graus3-Jun-09 22:07
protectorChristian Graus3-Jun-09 22:07 
Questionsizeof(struct) in C#.net Pin
eyeshield213-Jun-09 18:34
eyeshield213-Jun-09 18:34 
AnswerRe: sizeof(struct) in C#.net Pin
eyeshield213-Jun-09 19:01
eyeshield213-Jun-09 19:01 
GeneralRe: sizeof(struct) in C#.net Pin
bsaksida3-Jun-09 20:38
bsaksida3-Jun-09 20:38 
GeneralRe: sizeof(struct) in C#.net Pin
Luc Pattyn3-Jun-09 23:02
sitebuilderLuc Pattyn3-Jun-09 23:02 
QuestionDataGridView Pin
Yathish hatter3-Jun-09 18:28
Yathish hatter3-Jun-09 18:28 
AnswerRe: DataGridView Pin
Henry Minute4-Jun-09 3:01
Henry Minute4-Jun-09 3:01 

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.