Click here to Skip to main content
15,905,558 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How can I close an external windows programmatically in C# that I don't know when it will be opened?
Posted
Updated 5-Jul-15 19:40pm
v3
Comments
[no name] 6-Jul-15 1:45am    
Do I understand that you want to clobber any window that tries to open?
Rasoul Takalloo 6-Jul-15 1:54am    
yes, when i'm going to setup embeded exe file silently in my project it open another windows, i want to close that...

1 solution

You can use a windows service that would be running in the background.
keep searching for the window every few minutes and then close it as described in Find and Close the Window using Win API[^].

The service will need to be running with administrator privileges.
 
Share this answer
 
v2
Comments
Rasoul Takalloo 6-Jul-15 2:05am    
Thanks Abhinav, It work for me .Good job

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