By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,825 Members | 1,281 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,825 IT Pros & Developers. It's quick & easy.

Deployment/Custom Action/Shortcut triggers install

P: n/a
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
Nov 18 '08 #1
Share this Question
Share on Google+
3 Replies


P: n/a

"KennethLundin" <ke************@dacom.sewrote in message
news:32**********************************@x16g2000 prn.googlegroups.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.
Nov 18 '08 #2

P: n/a
On Nov 18, 11:24*pm, "Family Tree Mike"
<FamilyTreeM...@ThisOldHouse.comwrote:
"KennethLundin" <kenneth.lun...@dacom.sewrote in message

news:32**********************************@x16g2000 prn.googlegroups.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
Nov 19 '08 #3

P: n/a


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

news:32**********************************@x16g2000 prn.googlegroups.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.
Nov 19 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.