Deployment/Custom Action/Shortcut triggers install

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • KennethLundin

    #1

    Deployment/Custom Action/Shortcut triggers install

    Hi,

    i'm developing a solution in VS9/CSharp. Now I'm constructing a
    deployment project for my appliation (thick, database driven,
    winforms, standard, good old type of application).

    During installation I also install the PostgreSQL database and along
    with that I need to execute some Custom Actions. I've created a Custom
    Installer component in CSharp and calls it on Install/Rollback/
    uninstall and everything works great (Custom Actions are called upon
    and do what they should do and installation ends ok).

    I also install a shortcut to the main application in the start menu.
    This I do by creating a shortcut in the install/deployment project
    that points to the magic "Primary output from StoreManager". But here
    is the problem.

    When the application is installed from the MSI-package and after
    completion, the user clicks the shortcut, Windows installer pops up
    and the whole installation begins all over and it tries to install the
    whole application again, which fails since it is already installed and
    my custom action think that is "strange" and bails out...

    If i start the application not from the shortcut but by directly
    clicking on the EXE-file in the isntallation target dir it starts fine
    and works great... it's just the shortcut that does not work...

    And I've also noticed that if I remove the Custom Actions, this
    strange behavious goes away and the application is installed and is
    possible to start normally from the shortcut...

    Any ideas? It feels as if I've tried everything. I've done similar
    deployment projects before and used the Custom Action mechanism and
    have not had problems before...

    BR,
    Kenneth
  • Family Tree Mike

    #2
    Re: Deployment/Custom Action/Shortcut triggers install


    "KennethLun din" <kenneth.lundin @dacom.sewrote in message
    news:3248bbfa-d5a8-456c-ab6a-af666cf88f7b@x1 6g2000prn.googl egroups.com...
    Hi,
    >
    i'm developing a solution in VS9/CSharp. Now I'm constructing a
    deployment project for my appliation (thick, database driven,
    winforms, standard, good old type of application).
    >
    During installation I also install the PostgreSQL database and along
    with that I need to execute some Custom Actions. I've created a Custom
    Installer component in CSharp and calls it on Install/Rollback/
    uninstall and everything works great (Custom Actions are called upon
    and do what they should do and installation ends ok).
    >
    I also install a shortcut to the main application in the start menu.
    This I do by creating a shortcut in the install/deployment project
    that points to the magic "Primary output from StoreManager". But here
    is the problem.
    >
    When the application is installed from the MSI-package and after
    completion, the user clicks the shortcut, Windows installer pops up
    and the whole installation begins all over and it tries to install the
    whole application again, which fails since it is already installed and
    my custom action think that is "strange" and bails out...
    >
    If i start the application not from the shortcut but by directly
    clicking on the EXE-file in the isntallation target dir it starts fine
    and works great... it's just the shortcut that does not work...
    >
    And I've also noticed that if I remove the Custom Actions, this
    strange behavious goes away and the application is installed and is
    possible to start normally from the shortcut...
    >
    Any ideas? It feels as if I've tried everything. I've done similar
    deployment projects before and used the Custom Action mechanism and
    have not had problems before...
    >
    BR,
    Kenneth
    Is the second setup doing a "repair"? I don't know why only the desktop
    icon would do that, but I have seen something like that if a critical file
    from the install is edited by a custom action.


    Comment

    • KennethLundin

      #3
      Re: Deployment/Custom Action/Shortcut triggers install

      On Nov 18, 11:24 pm, "Family Tree Mike"
      <FamilyTreeM... @ThisOldHouse.c omwrote:
      "KennethLun din" <kenneth.lun... @dacom.sewrote in message
      >
      news:3248bbfa-d5a8-456c-ab6a-af666cf88f7b@x1 6g2000prn.googl egroups.com...
      >
      >
      >
      Hi,
      >
      i'm developing a solution in VS9/CSharp. Now I'm constructing a
      deployment project for my appliation (thick, database driven,
      winforms, standard, good old type of application).
      >
      During installation I also install the PostgreSQL database and along
      with that I need to execute some Custom Actions. I've created a Custom
      Installer component in CSharp and calls it on Install/Rollback/
      uninstall and everything works great (Custom Actions are called upon
      and do what they should do and installation ends ok).
      >
      I also install a shortcut to the main application in the start menu.
      This I do by creating a shortcut in the install/deployment project
      that points to the magic "Primary output from StoreManager". But here
      is the problem.
      >
      When the application is installed from the MSI-package and after
      completion, the user clicks the shortcut, Windows installer pops up
      and the whole installation begins all over and it tries to install the
      whole application again, which fails since it is already installed and
      my custom action think that is "strange" and bails out...
      >
      If i start the application not from the shortcut but by directly
      clicking on the EXE-file in the isntallation target dir it starts fine
      and works great... it's just the shortcut that does not work...
      >
      And I've also noticed that if I remove the Custom Actions, this
      strange behavious goes away and the application is installed and is
      possible to start normally from the shortcut...
      >
      Any ideas?  It feels as if I've tried everything.  I've done similar
      deployment projects before and used the Custom Action mechanism and
      have not had problems before...
      >
      BR,
      Kenneth
      >
      Is the second setup doing a "repair"?  I don't know why only the desktop
      icon would do that, but I have seen something like that if a critical file
      from the install is edited by a custom action.
      Hi,
      yeah, the second setup is probably doing a repair...

      I've investigated a little since you mentioned that changed files
      might trigger this, and that is what happens. When I start the
      database, it starts to change it's datafiles as it should, but it
      seems that it is this that triggers the repair... how do I specify
      that certain files should NOT be monitored by this installer feature
      so that they can be modified without it triggers a repair?

      BR,
      Kenneth

      Comment

      • =?Utf-8?B?RmFtaWx5IFRyZWUgTWlrZQ==?=

        #4
        Re: Deployment/Custom Action/Shortcut triggers install



        "KennethLun din" wrote:
        On Nov 18, 11:24 pm, "Family Tree Mike"
        <FamilyTreeM... @ThisOldHouse.c omwrote:
        "KennethLun din" <kenneth.lun... @dacom.sewrote in message

        news:3248bbfa-d5a8-456c-ab6a-af666cf88f7b@x1 6g2000prn.googl egroups.com...


        Hi,
        i'm developing a solution in VS9/CSharp. Now I'm constructing a
        deployment project for my appliation (thick, database driven,
        winforms, standard, good old type of application).
        During installation I also install the PostgreSQL database and along
        with that I need to execute some Custom Actions. I've created a Custom
        Installer component in CSharp and calls it on Install/Rollback/
        uninstall and everything works great (Custom Actions are called upon
        and do what they should do and installation ends ok).
        I also install a shortcut to the main application in the start menu.
        This I do by creating a shortcut in the install/deployment project
        that points to the magic "Primary output from StoreManager". But here
        is the problem.
        When the application is installed from the MSI-package and after
        completion, the user clicks the shortcut, Windows installer pops up
        and the whole installation begins all over and it tries to install the
        whole application again, which fails since it is already installed and
        my custom action think that is "strange" and bails out...
        If i start the application not from the shortcut but by directly
        clicking on the EXE-file in the isntallation target dir it starts fine
        and works great... it's just the shortcut that does not work...
        And I've also noticed that if I remove the Custom Actions, this
        strange behavious goes away and the application is installed and is
        possible to start normally from the shortcut...
        Any ideas? It feels as if I've tried everything. I've done similar
        deployment projects before and used the Custom Action mechanism and
        have not had problems before...
        BR,
        Kenneth
        Is the second setup doing a "repair"? I don't know why only the desktop
        icon would do that, but I have seen something like that if a critical file
        from the install is edited by a custom action.
        >
        Hi,
        yeah, the second setup is probably doing a repair...
        >
        I've investigated a little since you mentioned that changed files
        might trigger this, and that is what happens. When I start the
        database, it starts to change it's datafiles as it should, but it
        seems that it is this that triggers the repair... how do I specify
        that certain files should NOT be monitored by this installer feature
        so that they can be modified without it triggers a repair?
        >
        BR,
        Kenneth
        >
        In the setup project, look at the properties for the file in question. I
        believe that the property "Vital" should be set to false. I'm not at a site
        where I have access to one of my setup projects that I had this issue, so I
        cannot be positive this is the property.

        Comment

        Working...