Advertisable shortcut - repair

R

Roeland

Hello,

I added in my (MSI) installer project an advertisable shortcut, that
automatically repairs the installation when something is corrupted. It would
be more fine to have a normal shortcut, but I understood that this is not
possible without using Orca.

My installation project contains a custom action to start the application
after installation. However, now when I start the application with the
advertisable shortcut (and there is something to repair), the application is
now started twice (once by the custom action and once because I clicked the
shortcut).

Is there some way to determine whether the installation is started by an
advertisable shortcut or by a normal command Msiexec....? Then I am able to
only start the application in the custom action in the last situation.

Kind regards,
Roeland
 
P

Phil Wilson

When your repair takes place, the custom action is called again because that
installer component is being reinstalled, and running the custom action is
part of that reinstall. You could solve the problem if you condition your
custom action on Not Installed, because the Installed property is true when
your repair happens but most likely false when it's called in your initial
install, depending on where you sequenced it.
 
R

Roeland

Hello,

I think this is not sufficient, because I use the installer for performing
an automatic update of the application. In that case the application is
already installed.

So, is there another property to make the distinction between both
situations?

Kind regards,
Roeland


Phil Wilson said:
When your repair takes place, the custom action is called again because that
installer component is being reinstalled, and running the custom action is
part of that reinstall. You could solve the problem if you condition your
custom action on Not Installed, because the Installed property is true when
your repair happens but most likely false when it's called in your initial
install, depending on where you sequenced it.
--
Phil Wilson
[Microsoft MVP-Windows Installer]
Definitive Guide to Windows Installer
http://apress.com/book/bookDisplay.html?bID=280

Roeland said:
Hello,

I added in my (MSI) installer project an advertisable shortcut, that
automatically repairs the installation when something is corrupted. It
would
be more fine to have a normal shortcut, but I understood that this is not
possible without using Orca.

My installation project contains a custom action to start the application
after installation. However, now when I start the application with the
advertisable shortcut (and there is something to repair), the application
is
now started twice (once by the custom action and once because I clicked
the
shortcut).

Is there some way to determine whether the installation is started by an
advertisable shortcut or by a normal command Msiexec....? Then I am able
to
only start the application in the custom action in the last situation.

Kind regards,
Roeland
 
P

Phil Wilson

I think the REINSTALL property is true during a repair, so you could try a
condition of NOT REINSTALL on your custom action.
--
Phil Wilson [MVP Windows Installer]
----
Roeland said:
Hello,

I think this is not sufficient, because I use the installer for performing
an automatic update of the application. In that case the application is
already installed.

So, is there another property to make the distinction between both
situations?

Kind regards,
Roeland


Phil Wilson said:
When your repair takes place, the custom action is called again because that
installer component is being reinstalled, and running the custom action is
part of that reinstall. You could solve the problem if you condition your
custom action on Not Installed, because the Installed property is true when
your repair happens but most likely false when it's called in your initial
install, depending on where you sequenced it.
--
Phil Wilson
[Microsoft MVP-Windows Installer]
Definitive Guide to Windows Installer
http://apress.com/book/bookDisplay.html?bID=280

Roeland said:
Hello,

I added in my (MSI) installer project an advertisable shortcut, that
automatically repairs the installation when something is corrupted. It
would
be more fine to have a normal shortcut, but I understood that this is not
possible without using Orca.

My installation project contains a custom action to start the application
after installation. However, now when I start the application with the
advertisable shortcut (and there is something to repair), the application
is
now started twice (once by the custom action and once because I clicked
the
shortcut).

Is there some way to determine whether the installation is started by an
advertisable shortcut or by a normal command Msiexec....? Then I am able
to
only start the application in the custom action in the last situation.

Kind regards,
Roeland
 
D

Djs

If you want regular shortcuts instead, use the property
DISABLEADVTSHORTCUTS=1 when installing and your package will create normal
Windows type shortcuts.

D.

___________________________
Darwin J Sanoy
Principal Consultant and Trainer
DesktopEngineer.com
DesktopEngineerTraining.com
 

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