Kiran k g
Kiran k g

Reputation: 996

WIX custom installer admin privilege

I have developed a WIX custom installer using C# WPF. I need to delete a file from "c:\Program Files" using c#. It shows error unauthorised. If i manually run with "run as administrator" it works. I tried adding manifest file and necessary changes. But it didn't work. I tried copying the same manifest file to a console application and it works.

Upvotes: 1

Views: 323

Answers (1)

Swathy Puthiyidathu
Swathy Puthiyidathu

Reputation: 41

You can do this by creating a C# custom action project and referring it in the WIX project.

https://blogs.msdn.microsoft.com/jschaffe/2012/10/23/creating-wix-custom-actions-in-c-and-passing-parameters/

Upvotes: 2

Related Questions