Deployment/Custom Action/Shortcut triggers install

K

KennethLundin

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
 
F

Family Tree Mike

KennethLundin said:
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.
 
K

KennethLundin

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
 
F

Family Tree Mike

KennethLundin said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top