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.InvokeCustomAction(Int32
sessionHandle, String entryPoint, IntPtr remotingDelegatePtr)
-- 
View this message in context: 
http://n2.nabble.com/Locate-a-file-within-a-manged-custom-action-in-win2k8-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

Reply via email to