Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Installer components in C#

Installer components in C#

Scheduled Pinned Locked Moved C#
helpworkspacecsharpjavascripttools
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    adi rusu
    wrote on last edited by
    #1

    Hi, I need some help with an installer component. In the Install method I open a configuration form that I created which returns OK or Cancel as dialog results. I found on some site that if I want to cancel the installation, I have to throw an InstallException. At first, the setup wizard displayed a message box saying about an error with the code 2869. I don't really think there is any difference in the source code, but now I get the same message box, followed by another message box with no message. Do I need to install some service pack that supports cancelling the installation? Or does anyone know another way? A site with a tutorial for installer components would also be helpful (google didn't help much, or I didn't use the right keywords) I also tried using a NoImpersonate.js script file with a post build event. Didn't work. I tried running a .bat file containing "msiexec /i pathtofile.msi" with admin privileges. Still 2869. I read that this only happens on Vista ... I managed to get the same error on XP too :)) And yes I am running the setup.exe file, not the msi. Thank you

    R 1 Reply Last reply
    0
    • A adi rusu

      Hi, I need some help with an installer component. In the Install method I open a configuration form that I created which returns OK or Cancel as dialog results. I found on some site that if I want to cancel the installation, I have to throw an InstallException. At first, the setup wizard displayed a message box saying about an error with the code 2869. I don't really think there is any difference in the source code, but now I get the same message box, followed by another message box with no message. Do I need to install some service pack that supports cancelling the installation? Or does anyone know another way? A site with a tutorial for installer components would also be helpful (google didn't help much, or I didn't use the right keywords) I also tried using a NoImpersonate.js script file with a post build event. Didn't work. I tried running a .bat file containing "msiexec /i pathtofile.msi" with admin privileges. Still 2869. I read that this only happens on Vista ... I managed to get the same error on XP too :)) And yes I am running the setup.exe file, not the msi. Thank you

      R Offline
      R Offline
      rohan_puranik
      wrote on last edited by
      #2

      Hello This error generally occurs when custom action fails to perform its action with "Elevated Privileges" on Vista (which is a normal case). The solution is NoImpersonate.js but you are saying that it couldn't solve the problem. So can you tell me when exactly this message box appeared? I mean as soon as you ran exe or after completion of the "install" event i.e after welcome message window? One more thing. Have you used installer class to override custom action? Also are you passing the "Property" (i.e. value) consisting of Ok or Cancel to custom action? "Savedstate" and "idictionary" is used to do it.

      A 1 Reply Last reply
      0
      • R rohan_puranik

        Hello This error generally occurs when custom action fails to perform its action with "Elevated Privileges" on Vista (which is a normal case). The solution is NoImpersonate.js but you are saying that it couldn't solve the problem. So can you tell me when exactly this message box appeared? I mean as soon as you ran exe or after completion of the "install" event i.e after welcome message window? One more thing. Have you used installer class to override custom action? Also are you passing the "Property" (i.e. value) consisting of Ok or Cancel to custom action? "Savedstate" and "idictionary" is used to do it.

        A Offline
        A Offline
        adi rusu
        wrote on last edited by
        #3

        The message box appears when I click the Cancel button on my form. This is the code inside the overridden Install method: Config config = new Config(); if (config.ShowDialog() == DialogResult.Cancel) throw new InstallException("Installation aborted"); //I think this is why the error message is displayed. base.Install(stateSaver); where Config is the configuration form that I created. Can you tell me how to use SavedState and IDictionary to pass OK or Cancel to the custom action?

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups