Hmm, after further inspection on XP i've found there was another problem, which 
was fixed by requiring administrative rights.
When running from a LUA account:
  - On XP it now gives a message that an administrative user should run the 
installation.
  - On Vista, however, this message does not occour, nor a UAC is prompted; it 
just happely starts installing... (although the condition requiring 
administrative access should fail?)
  
Which still leaves the odd thing that installation on Vista elevates as 
required and XP doesn't seems to do that?
And on Vista it still seems that the XML COM server doesn't seem to run 
elevated and therefor cannot edit the XML file.
 
Did you read the MSDN link on COM Elevation Moniker? ( 
http://msdn2.microsoft.com/en-us/library/ms679687.aspx )
There is a part that mentioned: HKLM\Software\Classes\CLSID  
{CLSID}\Elevation\Enabled = 1 Maybe this is something?
 
I also found some info on why not use ::CoCreateInstance() on 
http://weblogs.asp.net/kennykerr/archive/2006/09/29/Windows-Vista-for-Developers-_1320_-Part-4-_1320_-User-Account-Control.aspx
 
But as i think you guys at Microsoft should know all this better than me? ;)
 
Regards,
 
Albert van Peppen
 
________________________________

Van: Albert van Peppen 
Verzonden: woensdag 9 mei 2007 15:56
Aan: 'Rob Mensching'
Onderwerp: RE: [WiX-users] Failed to open XML file on Vista


We don't ACL any files. The XML file is just installed by the MSI installer in 
elevated mode.
The user running the installer has least user access (LUA).
 
It is possible to log in what user state runs the COM InProc server, i doubt 
the COM is indeed called in any elevated state..
 
The mentioned problem also exists on XP with a very restricted user, so it is 
not just a Vista problem, but we've found it first in Vista so we thought it 
was a problem in/with Vista.
 
Can you checked the issue yourself?
 
I am willing to try and change some things in the WiX sources; just to see i'm 
right ;) But it seems a bit of task to get the WiX sources compiling.. (At 
least at this moment)
 
Regards,
 
Albert van Peppen
 

________________________________

Van: Rob Mensching [mailto:[EMAIL PROTECTED] 
Verzonden: woensdag 9 mei 2007 15:36
Aan: Albert van Peppen; Wix-Devs
Onderwerp: RE: [WiX-users] Failed to open XML file on Vista



The ExecXmlFile is already running in an elevated process so the elevation 
moniker should be unnecessary.  Besides, the fact that you're failing when 
running as a local administrator means that UAC is not the issue.  It looks 
like the problem is somehow related to the file only being accessible by the 
domain administrator.  Did you ACL the file down such that only the domain 
admin can access it?

 

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Albert van Peppen
Sent: Wednesday, May 09, 2007 5:58 AM
To: Wix-Devs
Subject: Re: [WiX-devs] [WiX-users] Failed to open XML file on Vista

 

Hi,

 

I posted this though to wix-dev since i believe the problem lies in WiX.

When looking at the source coude i found that XmlFile is useing the MSXML COM 
object.

This is done by calling ::CoCreateInstance().

When looking into ::CoCreateInstance() and COM and Elevation i found that you 
should use a Elevation Moniker.

 

Check at MSDN: http://msdn2.microsoft.com/en-us/library/ms679687.aspx

 

I also found that more ::CoCreateInstance() calls might be affected due to the 
missing elevation.

 

Can you guys at the Dev team look at this asap since it it is really a stopper 
for me! (I think Bob is the guy for this ;) )

 

As said, i am using WiX 2.0.5213.0. I think is worth a new release for WiX 2.0 
??

 

Regards,

 

Albert van Peppen

 

________________________________

Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens Albert van Peppen
Verzonden: woensdag 2 mei 2007 15:17
Aan: [EMAIL PROTECTED]
Onderwerp: [WiX-users] Failed to open XML file on Vista

Hi,

 

I try to install a XML file through my WiX Installer.

 

On WinXP i have no problems.

On Windows Vista (Business Edition), client in a Win2003 AD network, i have 
some strange problems;

 

- Installing as a domain administrator gives no problems.

- Installing as a local administrator gives an error; installation fails. 

- Installing as a local or domain user with restricted rights gives an error; 
installation fails.

- Installing with elevated rights / run as gives an error; installation fails. 
(With the exception of Run As domain Administrator)

 

In all cases where the installation fails the following error appears:

    'Failed to open XML file WInsad.xml, system error: -2147024786'

 

 

The logfile shows:

 

MSI (s) (18:E0) [12:50:19:270]: Running as a service.
MSI (s) (18:E0) [12:50:19:317]: Hello, I'm your 32bit Elevated custom action 
server.
MSI (s) (18!68) [12:50:19:364]: Creating MSIHANDLE (4645) of type 790531 for 
thread 4456
ExecXmlFile:  Error 0x8007006e: failed to load XML file: WInsad.xml
MSI (s) (18!68) [12:50:19:489]: Closing MSIHANDLE (4645) of type 790531 for 
thread 4456
MSI (s) (18!68) [12:50:19:536]: Creating MSIHANDLE (4646) of type 790531 for 
thread 4456
Fout 25531. Failed to open XML file WInsad.xml, system error: -2147024786
MSI (s) (18!68) [12:52:31:146]: Product: Drumis - Programma V2.90.2267.0 -- 
Fout 25531. Failed to open XML file WInsad.xml, system error: -2147024786

 

MSI (s) (18!68) [12:52:31:177]: Closing MSIHANDLE (4646) of type 790531 for 
thread 4456
MSI (s) (18:10) [12:52:31:208]: Closing MSIHANDLE (4644) of type 790536 for 
thread 3812
Actie beƫindigd 12:52:31: InstallExecute. Retourwaarde 3.

 

The following piece of code is what i use in WiX:

 

 <!-- ===== WInsad.xml = License file ===== -->
 <DirectoryRef Id="INSTALLDIR">
  <Component Id="WInsad.dat" Guid="xxxxxxxx-xxxx-xxx-xxx-xxxxxxxxxxx">
   <File Id="File_WInsad.dat" Name="WInsad.dat" DiskId="1" 
Source="$(var.MyApplicationSourcePath)\WInsad.dat" Vital="yes" />
  </Component>
  <Component Id="WInsad.xml" Guid="xxxxxxxx-xxxx-xxx-xxx-xxxxxxxxxxy">
   <File Id="File_WInsad.xml" Name="WInsad.xml" DiskId="1" 
Source="$(var.DrumisApplicationSourcePath)\WInsad.xml" Vital="yes" />
   <XmlFile Sequence="10" Id="Winsad.xml_License"        
File="[INSTALLDIR]WInsad.xml" Action="createElement" Name="License" 
ElementPath="//WInsad" />
   <XmlFile Sequence="11" Id="Winsad.xml_LicenseType"    
File="[INSTALLDIR]WInsad.xml" Action='setValue'      Name='type' Value='Demo' 
ElementPath='//WInsad/License' />
  </Component>
 </DirectoryRef>

 

 <!-- Features -->
 <FeatureRef Id="MainFeature">
  <ComponentRef Id="WInsad.dat" />
  <ComponentRef Id="WInsad.xml" />
 </FeatureRef>

 

The initial WInsad.xml file is installed on the targetsystem before the error. 
It initially looks like:

 

<?xml version="1.0" encoding="windows-1252"?>
<WInsad>
</WInsad>

 

 

The WiX version used in Wix-2.0.5213.0 

 

Am i doing something wrong or is it something with Wix-2 / Vista?

The InstallerVersion in the Package is set to "200", the InstallerPrivileges is 
set to "elevated".

 

Any help is welcome.

 

Regards,

 

Albert van Peppen

 

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
WiX-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-devs

Reply via email to