[wix-users] WiX fails to launch the installer when previous launch was from a removable drive

Mayooran Macilamany mayooran99 at gmail.com
Tue May 30 08:10:25 PDT 2017


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.ExecutionContext,
> System.Threading.ContextCallback, System.Object, Boolean)
>    at
> System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext,
> 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/
>


More information about the wix-users mailing list