[wix-users] Installing from a mapped network drive - Force it to use UNC?
Patterson, Brent
bcpatterson at xactware.com
Wed Sep 9 09:28:08 PDT 2015
Thanks for all of your help, you've helped nudge me in the correct direction! I finally figured out. What I need to do is to add this:
<ResolveSource Before="CostFinalize">NOT Installed</ResolveSource>
To the InstallExecuteSequence element. It will set SourceDir to the UNC path, not the mapped drive. I figured it out when I looked at InstallShield's ISM file, and it had a comment next to "ResolveSource" saying "This must be done before calling MoveSource". I missed this when I looked through it before.
Now the issue I'm struggling with is doing the same thing for the burn bundle. I pass in the WixBundleOriginalSourceFolder value to MSI (which the MSI then uses over SourceDir), but it points to the mapped drive. I tried looking up setting property values programmatically from C#, since C# has function that would resolve the UNC path, but no luck so far. Maybe I'm using the wrong search terms? Anyone have a handy link on how to do this?
-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Hoover, Jacob
Sent: Wednesday, September 09, 2015 10:20 AM
To: WiX Toolset Users Mailing List
Subject: Re: [wix-users] Installing from a mapped network drive - Force it to use UNC?
Are you testing your MSI without your bundle? Because Burn does it's best to only elevate once, it's going to launch the per-machine MSI elevated (and from the cached location) which will be too late for your CA too work. As a side note, from what I remember when looking at installshield MSI's, they embed a bunch of vendor specific CA's which may be modifying the SourceDir. Have you looked at your old MSI verbose log to see when SourceDir is being assigned?
-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Patterson, Brent
Sent: Tuesday, September 08, 2015 5:42 PM
To: WiX Toolset Users Mailing List
Subject: Re: [wix-users] Installing from a mapped network drive - Force it to use UNC?
Sorry, let me clarify. The Installshield generates two files, the exe and msi as part of build process. The exe is our custom UI stuff, while MSI is the basic windows installer. I don't see how installshield can modify the msi in ways that WiX can't. Running the MSI directly without any parameters passed in works for the installshield's MSI, but not the WiX's MSI, even though both have same files, same custom action, etc, and run from the same mapped network drive. What am I missing?
I've opened up both MSI files in orca, and can't really find anything obvious. The installshield's had a lot more tables, and it defined Media table, which WiX doesn't. Is this important? From what I understood, media is used for when you keep some files on a media source such as a CD. Does this have any impact on installing from network drives?
-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Carter Young
Sent: Tuesday, September 08, 2015 3:28 PM
To: WiX Toolset Users Mailing List
Subject: Re: [wix-users] Installing from a mapped network drive - Force it to use UNC?
You're not thinking logically here. Think of InstallShield, as another version of a Burn Bootstrapper, as that's all it is... As a hunch, I would guess that the InstallShield Bundle has the UNC hardcoded in the Package
On 09/08/2015 03:58 PM, Patterson, Brent wrote:
> It's a per-machine install, and I've left the default setting for InstallPrivileges (not defining it, which should elevate it as per the tip). It is started normally, without any arguments, I see a dialog box before it elevates, so theoretically at some point it is still on the current user account during the process before it elevates. Do I need to change the timing of the custom action that sets the SourceDir?
>
> This is the custom action that sets the values. INSTALLLOCATION is set from the burn bundle using WiXbundleOriginalSourceFolder property, if it's defined, it's used instead of the sourcedir one:
>
> <CustomAction Id="SetFolders" Property="CopyFiles" Value="
> SourceFolder=[SourceDir];SourceFolder2=[INSTALLLOCATION]"
> Execute="immediate" />
>
> And this is where it's called:
>
> <InstallExecuteSequence>
> <Custom Action="SetFolders" After="CostFinalize">NOT Installed</Custom>
> ....
>
> While I can bundle the MSI and pass in UNC (I've already created a bundle), we want to allow users the option of using either exe or msi. So MSI needs to be able to work without burn passing in values. If the Installshield's MSI can do it, why not WiX?
>
> Thanks again.
>
> -----Original Message-----
> From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On
> Behalf Of Hoover, Jacob
> Sent: Tuesday, September 08, 2015 12:44 PM
> To: WiX Toolset Users Mailing List
> Subject: Re: [wix-users] Installing from a mapped network drive - Force it to use UNC?
>
> Several things can complicate this... per-user vs per-machine, is there a UI sequence (or is it a silent install), is it started as an elevated process, etc.
>
> My biased opinion would be to bundle the MSI. From there, just pass
> WixBundleOriginalSourceFolder to the MSI as a property. (Tested that
> it works, even when elevated.)
>
> -----Original Message-----
> From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On
> Behalf Of Patterson, Brent
> Sent: Tuesday, September 08, 2015 1:18 PM
> To: WiX Toolset Users Mailing List
> Subject: Re: [wix-users] Installing from a mapped network drive - Force it to use UNC?
>
> Right, that's why I'm trying to get UNC (actual network path) for
> SourceDir. The Installshield MSI performs the same custom action, but
> it works somehow. I verified that it's using SourceDir. So if that
> MSI works, there must be something that I can configure for the WiX
> MSI to work. At least, that's my hope :)
>
> -----Original Message-----
> From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On
> Behalf Of Phill Hogland
> Sent: Tuesday, September 08, 2015 12:03 PM
> To: WiX Toolset Users Mailing List
> Subject: Re: [wix-users] Installing from a mapped network drive - Force it to use UNC?
>
> On Windows a mapped drive is defined in a particular user's profile, so if the registry for the elevated user has not been configured to know about that mapped drive, it won't do any good to try and generate a UNC (without also having some way of getting the drive mapping from the other user's registry profile). I don't know of any setting that will address this issue for you.
>
> -----Original Message-----
> From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On
> Behalf Of Patterson, Brent
> Sent: Tuesday, September 08, 2015 12:51 PM
> To: wix-users at lists.wixtoolset.org
> Subject: [wix-users] Installing from a mapped network drive - Force it to use UNC?
>
> Quick question:
>
> How do I set the MSI so it uses UNC instead of mapped drive when installing? I have a custom action that copies over a config file that uses "SourceDir", but fails due to the MSI being elevated thereby not having access to mapped drive. Is there a simple way of configuring an option somewhere to use UNC of a mapped drive? I can't convert from mapped drive to UNC in the custom action as it's too late, the user executing it is admin and not the same user, even though I put "Impersonate='Yes'", so the function fails.
>
> Thanks.
>
> ________________________________
>
> Xactware's opt-in mailing list allows you to receive Xactware News that is of interest to you. Visit my.xactware.com today to join or to update your email preferences!
>
> ________________________________
>
> This email is intended solely for the recipient. It may contain privileged, proprietary or confidential information or material. If you are not the intended recipient, please delete this email and any attachments and notify the sender of the error.
>
> ____________________________________________________________________
> 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/
____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/
More information about the wix-users
mailing list