I have a project in C# that uses dll (class library). This dll was written by another developer but now he is not our employee anymore and i can't change code of this dll. The class in this dll writes log file in current directory. But i want make installer for this project. If it installed in "Program Files" directory then program will crash. It happenes because of some class in this dll that try to write log file, but program doesn't has permission to do that. Does anyone has some advices?
Asked
Active
Viewed 610 times
0
-
You can consider decompiling and rebuilding the DLL after changing the log destination – Sergey Malyutin Oct 01 '14 at 12:08
-
You have a dll written by your company and you don't have the source code? Could you not decompile the dll? – Ash Burlaczenko Oct 01 '14 at 12:08
-
Then just don't install to "Program Files". Install it in '%APPDATA%' ('Roaming' or 'Local', like e.g. Chrome is doing it). There you can write! – oo_dev Oct 01 '14 at 12:18
1 Answers
0
Maybe you could use a Custom Action (Customizing Windows Installer Packages) to modify the rights of the created directory, so that each user has write access and can create or modify that log file(How to set access rights wih c#).