[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.setup

Windows installer activates upon first app launch after upgrade

hileyj

11/13/2007 5:03:00 PM

Hi,

I have an application which uses windows installer. When doing a fresh
install (ie when removing from control panel first), everything goes as
planned and the app launches normally the first time the shortcut is used.
When upgrading with a previous version present, the windows installer window
comes up upon the first launch to do some stuff and if the msi is in the
right place, everything works as planned. I'm guessing a repair is being
triggered somehow, but I'm not sure how to find out what is causing it, let
alone stop it.
After an upgrade, trying to run the exe directly from the program files
directory without using the shortcut gives the message "This application has
failed to start because the application configuration is incorrect.
Reinstalling the application may fix this problem." I tried adding the
DISABLEADVSHORTCUT property to the msi file to prevent the repair, but now
the shortcuts reference the exe directly and they also give this message.

Basically, I would just like to be able to upgrade or install the software
without having installer come up on the first application launch. Also, why
is it not possible to run the application directly from the .exe file?

Jon Hiley
5 Answers

hileyj

11/13/2007 6:02:00 PM

0

Ok,

After playing with this some more, it seems as though the problem somehow
lies with the manifest file. Removing the app.exe.manifest file from the
application directory in program files allows it to execute. Also, removing
the following section that includes RTC as a dependency allows the
application to execute:

<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Networking.RTCDLL"
version="5.2.1002.3"
processorArchitecture="X86"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>

I've checked my Winsxs directory, and it seems as though the correct version
of RTC is there...

Phil Wilson

11/14/2007 8:41:00 PM

0

It's not obvious to me that these are connected, but there are two issues
here:

1) A MSI repair issue. Typically removing files or registry entries (after
the install) is what triggers a repair, anything else is likely to be more
complicated. The event log MsiInstaller entries will have some info on what
seems to be broken.
2) Your manifest has an error. Again, there should be a SxS event log entry
that points to the line with the error.
--
Phil Wilson
[MVP Windows Installer]


"hileyj" <hileyj@discussions.microsoft.com> wrote in message
news:00F5519C-0FE9-4412-9763-CC3BDCE7B26D@microsoft.com...
> Ok,
>
> After playing with this some more, it seems as though the problem somehow
> lies with the manifest file. Removing the app.exe.manifest file from the
> application directory in program files allows it to execute. Also,
> removing
> the following section that includes RTC as a dependency allows the
> application to execute:
>
> <dependency>
> <dependentAssembly>
> <assemblyIdentity
> type="win32"
> name="Microsoft.Windows.Networking.RTCDLL"
> version="5.2.1002.3"
> processorArchitecture="X86"
> publicKeyToken="6595b64144ccf1df"
> language="*"
> />
> </dependentAssembly>
> </dependency>
>
> I've checked my Winsxs directory, and it seems as though the correct
> version
> of RTC is there...


hileyj

11/15/2007 6:08:00 PM

0

Hi,
Thanks for the reply! I have some more information about the bug, but
nothing is jumping out at me...

> It's not obvious to me that these are connected, but there are two issues
> here:
>
> 1) A MSI repair issue. Typically removing files or registry entries (after
> the install) is what triggers a repair, anything else is likely to be more
> complicated. The event log MsiInstaller entries will have some info on what
> seems to be broken.

This is what I suspected, but I can't see anything in the event logs that
suggests something is being removed or changed during an upgrade. Suppose I
have version 1.0.0 installed correctly. When I upgrade to 1.0.1 I see the
following events:
1. SystemRestore - Successfully created restore point... app 1.0.1
2. RestartManager - Starting Session 1 at 5:15:56
3. RestartManager - Starting Session 1 at 5:16:00
4. EventAgnt - SNMP Event Log Extension Agent has terminated.
5. SystemRestore - Successfully created restore point Description= ""
6. RestartManage - Ending Session 1 started at 5:15:56
7. RestartManage - Ending Session 1 started at 5:16:00
8. MsiInstaller - Product: Application 1.0.1 -- Installation completed
successfully.
9. MsiInstaller - Windows Installer installed the product. Name:
Application 1.0.1 Version 1.0.1 Product Language 1033. Installation or error
status: 0.

Then when I try to run the application from the .exe I get an error message
and an event logged which says
1. SideBySide - Activation context generation failed for "C:\Program
Files\Company\Application\Application.exe.Manifest". Dependent Assembly
Microsoft.Windows.Networking.RtcDll,language="*",processorArchitecture="X86",publicKeyToken="6595b64144ccf1df",type="win32",version="5.2.1002.3"
could not be found. Please use sxstrace.exe for detailed diagnosis.

And dir c:\windows\winsxs *rtc* shows

10/09/2007 11:40 AM <DIR>
x86_microsoft.windows.networking.rtcdll_6595b64144ccf1df_5.2.1002.3_none_af1aecad9109b29e
10/09/2007 11:40 AM <DIR>
x86_microsoft.windows.networking.rtcres_6595b64144ccf1df_5.2.1002.3_none_b5a302ab8cccdfca


> 2) Your manifest has an error. Again, there should be a SxS event log entry
> that points to the line with the error.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
version="3.0.4.0"
processorArchitecture="x86"
name="Application"
type="win32"
/>

<description>Application</description>

<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Networking.RtcDll"
version="5.2.1002.3"
processorArchitecture="X86"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>

</assembly>

I can't see anything here that would lead to an error, but I'm not too sure
of the syntax to begin with. And as I said before, running the program from
the shortcut triggers a repair after which the program works.

Thanks,
Jon Hiley

hileyj

11/21/2007 4:22:00 PM

0

OK, I'm pretty sure this has something to do with the RTC merge module being
included with the setup.
To test, I used a machine that did not have the correct version of RTC
present before the application was installed. I then installed the app and
the necessary RTC assemblies showed up in the WinSxS directory. After doing
an upgrade, these RTC directories (v5.2.1002.3) were removed! Trying to run
the app from the .exe failed with an event that said it could not find the
correct RTC assembly. Running from the shortcut caused the repair which
replaced those assemblies and everything was good after that.

So, I tried a workaround by changing the order of the InstallExecuteSequence
so that the RemoveExistingProducts action came at the very end, after the
install finalize. This seemed to work in the sense that it prevented the
repair from taking place and it is possible to run from the .exe after the
upgrade.

However, I have a new problem... we have custom actions that execute on
Install, commit and uninstall. When I upgrade from a previous release of
software to one with the new InstallExecuteSequence the install fails. It
seems that it can't find other application components that are needed in the
'SetupHelper'. From the MsiExec log:

(Action=_DB0CD5F9_984B_4DBD_8C85_90608B8E7D0B.commit,ActionType=1537,Source=BinaryData,Target=ManagedInstall,CustomActionData=/installtype=notransaction
/action=commit /LogFile= "C:\Program Files\XX\APP\SetupHelper2.dll"
"C:\Users\Jon\AppData\Local\Temp\CFGF6A5.tmp")
MSI (s) (5C:4C) [16:40:47:493]: Executing op:
ActionStart(Name=_7F8FE87B_8220_4E5F_BAA4_024F7A45125F.install,,)
Action 16:40:47: _7F8FE87B_8220_4E5F_BAA4_024F7A45125F.install.
MSI (s) (5C:4C) [16:40:47:494]: Executing op:
CustomActionSchedule(Action=_7F8FE87B_8220_4E5F_BAA4_024F7A45125F.install,ActionType=1025,Source=BinaryData,Target=ManagedInstall,CustomActionData=/installtype=notransaction
/action=install /LogFile= /SourceDir="c:\Users\Jon\Desktop\APP3.0.4\\"
"C:\Program Files\XX\APP\SetupHelper2.dll"
"C:\Users\Jon\AppData\Local\Temp\CFGF6A5.tmp")
MSI (s) (5C:AC) [16:40:47:515]: Invoking remote custom action. DLL:
C:\Windows\Installer\MSI33B2.tmp, Entrypoint: ManagedInstall
MSI (s) (5C!2C) [16:40:47:944]: Note: 1: 2262 2: Error 3: -2147287038
MSI (c) (14:C4) [16:40:47:945]: Note: 1: 2262 2: Error 3: -2147287038
DEBUG: Error 2869: The dialog ErrorDialog has the error style bit set, but
is not an error dialog

And after this the install fails and rolls back. Note that upgrading from a
version with the new InstallExecuteSequence to another with the same sequence
works OK.

Jon

Phil Wilson

11/21/2007 7:05:00 PM

0

It sounds like you've got this:
http://support.microsoft.com/kb/90...
This kb article describes a bug in fusion during major upgrades. Since
fusion installs assemblies into SxS (as well as the GAC) you've got the same
problem in the SxS directory. The repair notices the problem and tries to
fix it. I wonder if you already made this connection because you moved
RemoveExistingProducts.
Moving REP to after InstallFinalize means that uninstall custom actions run
on a system where the new product has just been installed. That's likely to
be weird if you're running code that has already been replaced by the
updated product install.
--
Phil Wilson
[MVP Windows Installer]


"hileyj" <hileyj@discussions.microsoft.com> wrote in message
news:D977DD36-721C-426C-A887-AF677A647847@microsoft.com...
> OK, I'm pretty sure this has something to do with the RTC merge module
> being
> included with the setup.
> To test, I used a machine that did not have the correct version of RTC
> present before the application was installed. I then installed the app
> and
> the necessary RTC assemblies showed up in the WinSxS directory. After
> doing
> an upgrade, these RTC directories (v5.2.1002.3) were removed! Trying to
> run
> the app from the .exe failed with an event that said it could not find the
> correct RTC assembly. Running from the shortcut caused the repair which
> replaced those assemblies and everything was good after that.
>
> So, I tried a workaround by changing the order of the
> InstallExecuteSequence
> so that the RemoveExistingProducts action came at the very end, after the
> install finalize. This seemed to work in the sense that it prevented the
> repair from taking place and it is possible to run from the .exe after the
> upgrade.
>
> However, I have a new problem... we have custom actions that execute on
> Install, commit and uninstall. When I upgrade from a previous release of
> software to one with the new InstallExecuteSequence the install fails. It
> seems that it can't find other application components that are needed in
> the
> 'SetupHelper'. From the MsiExec log:
>
> (Action=_DB0CD5F9_984B_4DBD_8C85_90608B8E7D0B.commit,ActionType=1537,Source=BinaryData,Target=ManagedInstall,CustomActionData=/installtype=notransaction
> /action=commit /LogFile= "C:\Program Files\XX\APP\SetupHelper2.dll"
> "C:\Users\Jon\AppData\Local\Temp\CFGF6A5.tmp")
> MSI (s) (5C:4C) [16:40:47:493]: Executing op:
> ActionStart(Name=_7F8FE87B_8220_4E5F_BAA4_024F7A45125F.install,,)
> Action 16:40:47: _7F8FE87B_8220_4E5F_BAA4_024F7A45125F.install.
> MSI (s) (5C:4C) [16:40:47:494]: Executing op:
> CustomActionSchedule(Action=_7F8FE87B_8220_4E5F_BAA4_024F7A45125F.install,ActionType=1025,Source=BinaryData,Target=ManagedInstall,CustomActionData=/installtype=notransaction
> /action=install /LogFile= /SourceDir="c:\Users\Jon\Desktop\APP3.0.4\\"
> "C:\Program Files\XX\APP\SetupHelper2.dll"
> "C:\Users\Jon\AppData\Local\Temp\CFGF6A5.tmp")
> MSI (s) (5C:AC) [16:40:47:515]: Invoking remote custom action. DLL:
> C:\Windows\Installer\MSI33B2.tmp, Entrypoint: ManagedInstall
> MSI (s) (5C!2C) [16:40:47:944]: Note: 1: 2262 2: Error 3: -2147287038
> MSI (c) (14:C4) [16:40:47:945]: Note: 1: 2262 2: Error 3: -2147287038
> DEBUG: Error 2869: The dialog ErrorDialog has the error style bit set,
> but
> is not an error dialog
>
> And after this the install fails and rolls back. Note that upgrading from
> a
> version with the new InstallExecuteSequence to another with the same
> sequence
> works OK.
>
> Jon
>