Modify Machine.config

Dec 12, 2014 at 4:03 PM
Hi,

I want to edit the machine.configs with a custom action. The problem is that during the installation there installer has no rights to edit the file.

When I run the exact same code in a normal c# class it works just fine.

Any help?

Thanks,
Kevin
Dec 19, 2014 at 12:38 AM
Hi there, I apologize for such a long delay with the response. Accidentally my CodePlex notifications were switched off and until now I was not aware about your post.

If you haven't solve your problem yet... you may want to try to start from your Custom Action a small application that would require elevation. Then you can do the .config modification from your application. And of course you would need to embed this application in your MSI.

The problem the is that if your code (custom action) requires elevation there is no way to elevate it. Any elevation must happen before the start of the application. That is why you need to start another app for this. Though I am surprised the MSI session in your case is not elevated already. I always thought it should be....

Merry Christmas,
Oleg
Dec 19, 2014 at 12:38 AM
##- Please type your reply above this line -##

Your request (#518327) has been received and is being reviewed by our support staff.

To add additional comments, reply to this email or click the link below:
http://service.orbitone.com/requests/518327

Wixsharp

Wixsharp

Dec 19 01:38

From: oleg_s

Hi there, I apologize for such a long delay with the response. Accidentally my CodePlex notifications were switched off and until now I was not aware about your post.

If you haven't solve your problem yet... you may want to try to start from your Custom Action a small application that would require elevation. Then you can do the .config modification from your application. And of course you would need to embed this application in your MSI.

The problem the is that if your code (custom action) requires elevation there is no way to elevate it. Any elevation must happen before the start of the application. That is why you need to start another app for this. Though I am surprised the MSI session in your case is not elevated already. I always thought it should be....

Merry Christmas,

Oleg

This email is a service from Orbit One ServiceDesk. Delivered by Zendesk.
Message-Id:STCP5HQJ_54937398f854_16de3fe350ccd32836487f_sprut ----==_mimepart_549373982a525_16de3fe350ccd32836505f--