i have a code that uploads a file to ftp. i want it to add an exception in firewall when it executes so that the firewall doesnot request the user for permissions. i know how to add a registry entry but i dont know how to add a firewall exception using c++. i expect help here. thanks.

Adding an exception to a firewall is an administrative task that will require users with UAC enabled to give permission to your program. There is no non malicious way to achieve this that I know of however there is a reference to the windows firewall API which will give you access to services already granted to the user by the firewall here...

http://msdn.microsoft.com/en-us/library/windows/desktop/aa366449(v=vs.85).aspx

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.