views:

153

answers:

1

I am making a call to: config.Save(ConfigurationSaveMode.Modified); and this call works fine in Windows XP.

When I run it in Vista I get:

Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Configuration.ConfigurationErrorsException: An error occurred loading a configuration file: Access to the path 'C:\Windows\system32\2lqfj0cv.tmp' is denied. (C:\Windows\system32\MsiExec.config) ---> System.UnauthorizedAccessException: Access to the path 'C:\Windows\system32\2lqfj0cv.tmp' is denied.

Now I guss the pertinent fact here is that I am running the call above from a Windows Installer MSI (call to a managed DLL). I guess I need to do something to up the user permissions? I really don't know a lot about Vista permissions?

+1  A: 

Try using run as admin. Also do you mean to be editing the MSIEXEC.config?

http://msdn.microsoft.com/en-us/library/bb756929.aspx

Matthew Whited
Set the required execution level of the Setup.exe of my installer to "Administrator". Works just fine now.
Duncan Edwards

related questions