[wix-users] WiX fails to launch the installer when previous launch was from a removable drive
Hoover, Jacob
Jacob.Hoover at greenheck.com
Tue May 30 18:06:58 PDT 2017
So if you install from removable media, it remembers that location. So it's a fault in your BA where it's attempting to log on upgrade, when it invokes the old bundle to remove it. Since it remembers the original media location, and that location is no longer valid.
I am confused why you would need to log anything at that location, as the media may have been burnt on a read only media (DVD/CD/Etc). Logs typically go to the temp folder. If you need to have some logic for your deployment environment that you don't already get with burn, you could return custom exit codes for your process.
-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Mayooran Macilamany
Sent: Tuesday, May 30, 2017 6:13 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] WiX fails to launch the installer when previous launch was from a removable drive
Yes I do believe that its the old package that gets invoked. How do I do what you have mentioned in the comments? How can I check if the original source has not been already set and set it to where its running from right now? I thought that's what the line <Variable Name="OriginalLocation"
Type="string" Value="[WixBundleOriginalSource]" bal:Overridable="yes"/> does. If that's not so, how can I do this?
On Tue, May 30, 2017 at 10:33 PM, Hoover, Jacob <Jacob.Hoover at greenheck.com>
wrote:
> The question I have is if it's your update bundle or your original bundle.
> Since the bundle upgrade will also invoke your old bundle to remove
> it's left over bits.
>
> And from the comments in code...
>
> // If the original source has not been set already then
> set it where the bundle is
> // running from right now. This value will be persisted
> and we'll use it when launched
> // from the clean room or package cache since none of our
> packages will be relative to
> // those locations.
>
>
> -----Original Message-----
> From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On
> Behalf Of Mayooran Macilamany
> Sent: Tuesday, May 30, 2017 10:55 AM
> To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
> Subject: Re: [wix-users] WiX fails to launch the installer when
> previous launch was from a removable drive
>
> I have a log entry mentioning the location where this file is to be
> written. Its referring to a drive that doesn't exist, which is E:\ drive.
> As I said, this failure is happening when I run the first installation
> from a removable disk. So when I try to update this removable disk
> installation with another installer that is inside the local disk, its
> crashing and the first mail I sent contains the event viewer log. So
> the bottomline is that this happens during an update, when the first
> installation was done from a removable disk. The last log entry
> mentions the location to write this result file. That means, it
> crashed since this location points to a non-existing location. But why
> does it point to a non existing location?
> Yes I ran the 1st installation from a removable disk, but the current
> update I am trying to do is from a local disk. Should this not point
> to this local disk as its log writing location? This is super confusing.
>
> On Tue, May 30, 2017 at 8:56 PM, Hoover, Jacob
> <Jacob.Hoover at greenheck.com
> >
> wrote:
>
> > The BA should be defending against bad/missing/malformed variables
> > and not just blindly write a log file to a path in a variable. You
> > are assuming that the path where the installer started was writable,
> > always available, and that you actually have permission to write to it.
> >
> > That being said, what do the logs in your temp folder show? When is
> > the failure happening? What does the code near this code look like?
> >
> >
> > -----Original Message-----
> > From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On
> > Behalf Of Mayooran Macilamany
> > Sent: Tuesday, May 30, 2017 10:10 AM
> > To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
> > Subject: Re: [wix-users] WiX fails to launch the installer when
> > previous launch was from a removable drive
> >
> > Below is how I am writing to the file from my custom BA class.
> >
> > string launchedFolder =
> > Path.GetDirectoryName(this.Engine.FormatString(this.
> > Engine.StringVariables["OriginalLocation"]));
> > File.WriteAllText(launchedFolder +
> > "\\exec_result.txt", "fail=Update failed: " + "Product Already
> > Installed.");
> >
> > Above variable original location is set in the Bundle.wxs file of
> > the boot strapper as shown below.
> >
> > <Variable Name="OriginalLocation" Type="string"
> > Value="[WixBundleOriginalSource]" bal:Overridable="yes"/>
> >
> > I tried attaching the device again, before running the install from
> > the local drive. Still getting the same error. Any clues?
> >
> > On Tue, May 30, 2017 at 7:37 PM, Tyler Gustafson
> > <tgustafson at solacom.com>
> > wrote:
> >
> > > How are you writing to the file in the current directory? What
> > > happens if you attach the removable disk before running the
> > > install from the local drive?
> > > ________________________________
> > > From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf
> > > of Mayooran Macilamany <mayooran99 at gmail.com>
> > > Sent: May 30, 2017 9:36:42 AM
> > > To: WiX Toolset Users Mailing List
> > > Subject: [wix-users] WiX fails to launch the installer when
> > > previous launch was from a removable drive
> > >
> > > Hi all,
> > >
> > > Say I install my managed bootstrapper burn installer from a
> > > removable
> > disk.
> > > This installs fine. But the next time I try to install/update this
> > > from a local drive, the update/install process fails. The
> > > installer UI crashes when I double click on it to launch the
> > > installer. Why is this
> > happening?
> > > If the previous installation was from a local disk, then
> > > update/install works fine. Why is this happening? Below is what I
> > > have found in the event logs.
> > >
> > > Please note that I am writing to a file about the installation
> > > status, from the directory in which the installer is launched from.
> > > Could this be causing the issue? But why would this be an issue
> > > since now the launched directory is the local drive and its only
> > > the previous version installation that happened from an external disk.
> > >
> > > Any help would be much appreciated.
> > >
> > > Application: BasePlatformSetup.exe Framework Version: v4.0.30319
> > > Description: The process was terminated due to an unhandled exception.
> > > Exception Info: System.IO.DirectoryNotFoundException
> > > at System.IO.__Error.WinIOError(Int32, System.String)
> > > at System.IO.FileStream.Init(System.String, System.IO.FileMode,
> > > System.IO.FileAccess, Int32, Boolean, System.IO.FileShare, Int32,
> > > System.IO.FileOptions, SECURITY_ATTRIBUTES, System.String,
> > > Boolean, Boolean, Boolean)
> > > at System.IO.FileStream..ctor(System.String,
> > > System.IO.FileMode, System.IO.FileAccess, System.IO.FileShare,
> > > Int32, System.IO.FileOptions, System.String, Boolean, Boolean, Boolean)
> > > at System.IO.StreamWriter.CreateFile(System.String, Boolean,
> Boolean)
> > > at System.IO.StreamWriter..ctor(System.String, Boolean,
> > > System.Text.Encoding, Int32, Boolean)
> > > at System.IO.File.InternalWriteAllText(System.String,
> > > System.String, System.Text.Encoding, Boolean)
> > > at System.IO.File.WriteAllText(System.String, System.String)
> > > at CustomBA.CustomBA.Run()
> > > at System.Threading.ThreadHelper.ThreadStart_Context(System.Object)
> > > at
> > > System.Threading.ExecutionContext.RunInternal(System.Threading.
> > > ExecutionContext,
> > > System.Threading.ContextCallback, System.Object, Boolean)
> > > at
> > > System.Threading.ExecutionContext.Run(System.Threading.ExecutionCo
> > > nt ex t, System.Threading.ContextCallback, System.Object, Boolean)
> > > at
> > > System.Threading.ExecutionContext.Run(System.Threading.ExecutionCo
> > > nt ex t, System.Threading.ContextCallback, System.Object)
> > > at System.Threading.ThreadHelper.ThreadStart()
> > >
> > > __________________________________________________________________
> > > __ WiX Toolset Users Mailing List provided by FireGiant
> > > http://www.firegiant.com/
> > >
> > > __________________________________________________________________
> > > __ WiX Toolset Users Mailing List provided by FireGiant
> > > http://www.firegiant.com/
> > >
> >
> > ____________________________________________________________________
> > WiX Toolset Users Mailing List provided by FireGiant
> > http://www.firegiant.com/
> >
> > ____________________________________________________________________
> > WiX Toolset Users Mailing List provided by FireGiant
> > http://www.firegiant.com/
> >
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> http://www.firegiant.com/
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> http://www.firegiant.com/
>
____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/
More information about the wix-users
mailing list