Click here to Skip to main content
15,891,607 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello guys,

I do have a third party C# Exe to perform some operation. I do call it using Program.Start. When that Exe executes, it writes log to event viewer.

My question is that can we prevent that the third party EXE should not write any single log in the event viewer, because people are complaining where this Exe is running on to their system.

Is there any way to prevent this??
Posted

This is one of the reasons why it's really bad to use some 3rd-party code without source code. I would advise to avoid it by all means. By the way, the problem has nothing to do with registry (thanks goodness, more and more software products these days don't contaminate system registry anymore, but some do).

Of course, it could be possible that the application in question has provisions to switch off the logging, which is typically done in the *.config file, but 1) I believe you already explored this opportunity and you would not ask this question if you could find the way; 2) you did not provide any relevant information on this application to help with this.

In principle, if there are no other way and if the application in question is a .NET application, you can easily reverse-engineer it, remove logging and recompile it. For this purpose, Reflector or, better, open-source ILSpy can be used. Please see:
http://en.wikipedia.org/wiki/.NET_Reflector[^],
http://ilspy.net[^].

—SA
 
Share this answer
 
Comments
Praveen Kumar Upadhyay 29-Dec-14 4:34am    
Yes, I have tried all possible ways to solve my problem. But thank you, I think your reverse-engineering idea can solve my problem.
[no name] 29-Dec-14 7:57am    
Which is most probably illegal....
Praveen Kumar Upadhyay 29-Dec-14 8:10am    
Oh. Then I need to go with some other option. Thank you Bruno.
Sergey Alexandrovich Kryukov 29-Dec-14 11:48am    
No, no, most probably, it is not illegal. It depends on the legislation. The usual formula explicitly allowing reverse engineering is "to make software product more usable", or something like that. The idea is: if one wants, for example, to reverse-engineer the product to break some protection and then sell it, it would be illegal. But your case is exactly when you just need to improve the product to make it usable to you. After all, this is the developer's fault, to leave excessive logging with compromise usability.

Also, "some other option" you mentioned may not exist.

Nevertheless, it's always good to check up legibility of your use of the product.

—SA
[no name] 29-Dec-14 12:27pm    
"Nevertheless, it's always good to check up legibility of your use of the product.", that is a good summary. All these rights question depends on so much (country of user, country of origin of the product, ....).

+5
Bruno
SQL
You said that you have been using some third party componet to call an EXE file.I believe that there might be some settings in the configuration file.

Did you check web.config or any other configuration file?
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 29-Dec-14 3:31am    
Not really an answer. OP did not provide any information which could support your "belief". Application which unconditionally perform logging are fairly common. This is not nice, but still does not give you a reason to believe they should allow to opt-out logging.
—SA
Praveen Kumar Upadhyay 29-Dec-14 4:30am    
Exe does not have config files. I already tried all possible ways.
Praveen Kumar Upadhyay 29-Dec-14 4:32am    
Arjunan, before posting an answer please make sure that whether your answer is gonna help the OP to get it solve. If you have any concern then post that concern in the comment box. By the way thank you for attempting.
Arjsrya 29-Dec-14 4:39am    
cool

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900