Manipulation of files within my target installation path are working, but
they don't work in windows directory.

I have played with impersonating without success.

                <CustomAction Id="UpdateConfiguration" Impersonate="yes"
BinaryKey="TestCA.CustomActions" DllEntry="UpdateConfiguration"
Execute="deferred" Return="check" />




tgoffice wrote:
> 
> Thanks for your answer, I have also made a simple test to read a file from
> c:\temp folder (with same error) 
> 
> 
> 
> Peter Shirtcliffe wrote:
>> 
>> I would guess that on a 64-bit system, Environment.SpecialFolder.System
>> points to a 64-bit-specific location which would be different to the
>> 32-bit version. 
>> I had this problem with SpecialFolder.ProgramFiles where the location
>> automatically changed from Program Files to Program Files (x86) on
>> 64-bit.
>> 
>> 
>> -----Original Message-----
>> From: tgoffice [mailto:tgoff...@web.de] 
>> Sent: 25 August 2009 14:18
>> To: wix-users@lists.sourceforge.net
>> Subject: [WiX-users] Locate a file within a manged custom action in
>> win2k8 x64
>> 
>> 
>> Hello,
>> 
>> I have a problem with migrating my wix based 32bit msi to windows server
>> 2008 64 bit.
>> 
>> everythink works fine, except file manipulation within a custom action.
>> 
>> I have to modify an IIS configuration file within
>> %windows%\inetsrv\config\applicationHost.config", but I get a
>> FileNotFoundException.
>> The file exists, I think it's an security/x64 issue.
>> 
>> Following code is used:
>> 
>> string path =
>> Environment.GetFolderPath(Environment.SpecialFolder.System);
>> path = Path.Combine(path, @"inetsrv\config\applicationHost.config");
>> File.Exists(path) // returns false
>> 
>> Installer is executed with administator privilegs, UAC is disabled.
>> 
>> Every hint is appreciated!
>> thomas
>> 
>> Exception:
>> 
>> System.Reflection.TargetInvocationException: Exception has been thrown
>> by the target of an invocation. ---> System.IO.FileNotFoundException:
>> Could not find file 'C:\windows\inetsrv\config\applicationHost.config'.
>>    at System.IO.__Error.WinIOError(Int32 errorCode, String
>> maybeFullPath)
>>    at System.IO.FileStream.Init(String path, FileMode mode, FileAccess
>> access, Int32 rights, Boolean useRights, FileShare share, Int32
>> bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String
>> msgPath, Boolean
>> bFromProxy)
>>    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess
>> access, FileShare share, Int32 bufferSize, FileOptions options)
>>    at System.IO.StreamReader..ctor(String path, Encoding encoding,
>> Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize)
>>    at System.IO.StreamReader..ctor(String path) ....
>>    --- End of inner exception stack trace ---
>>    at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object
>> arguments, SignatureStruct& sig, MethodAttributes methodAttributes,
>> RuntimeTypeHandle typeOwner)
>>    at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object
>> arguments, Signature sig, MethodAttributes methodAttributes,
>> RuntimeTypeHandle typeOwner)
>>    at System.Reflection.RuntimeMethodInfo.Invoke(Object obj,
>> BindingFlags invokeAttr, Binder binder, Object parameters, CultureInfo
>> culture, Boolean
>> skipVisibilityChecks)
>>    at System.Reflection.RuntimeMethodInfo.Invoke(Object obj,
>> BindingFlags invokeAttr, Binder binder, Object parameters, CultureInfo
>> culture)
>>    at
>> Microsoft.Deployment.WindowsInstaller.CustomActionProxy.InvokeCustomActi
>> on(Int32
>> sessionHandle, String entryPoint, IntPtr remotingDelegatePtr)
>> --
>> View this message in context:
>> http://n2.nabble.com/Locate-a-file-within-a-manged-custom-action-in-win2
>> k8-x64-tp3509684p3509684.html
>> Sent from the wix-users mailing list archive at Nabble.com.
>> 
>> ------------------------------------------------------------------------
>> ------
>> Let Crystal Reports handle the reporting - Free Crystal Reports 2008
>> 30-Day trial. Simplify your report design, integration and deployment -
>> and focus on what you do best, core application coding. Discover what's
>> new with Crystal Reports now.  http://p.sf.net/sfu/bobj-july
>> _______________________________________________
>> WiX-users mailing list
>> WiX-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/wix-users
>> 
>> SDL PLC confidential, all rights reserved.
>> If you are not the intended recipient of this mail SDL requests and
>> requires that you delete it without acting upon or copying any of its
>> contents, and we further request that you advise us.
>> SDL PLC is a public limited company registered in England and Wales. 
>> Registered number: 02675207.  
>> Registered address: Globe House, Clivemont Road, Maidenhead, Berkshire
>> SL6 7DY, UK.
>> 
>> 
>> ------------------------------------------------------------------------------
>> Let Crystal Reports handle the reporting - Free Crystal Reports 2008
>> 30-Day 
>> trial. Simplify your report design, integration and deployment - and
>> focus on 
>> what you do best, core application coding. Discover what's new with 
>> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
>> _______________________________________________
>> WiX-users mailing list
>> WiX-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/wix-users
>> 
>> 
> :-(
> 

-- 
View this message in context: 
http://n2.nabble.com/Locate-a-file-within-a-manged-custom-action-in-win2k8-x64-tp3509684p3514807.html
Sent from the wix-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to