Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Check if a drive is shared. Unblock a port

Status
Not open for further replies.

Fozzie22

Programmer
Dec 3, 2003
59
AU
Hi all,

I have a couple of questions. When my program first runs I would like it to check if one of the computers hard disks is set to shared. I would also like to unblock a port (10000) as I use this as comms channel and also to stop XP from poping up the annoying "do you want to unblock the port" message.

Can anyone suggest a way of how to do this.

Thanks

Fozzie
 
If the machine is on a domain with active directory, you can pull the shares from there. If not, you will likely have to use the Windows Management Interface (WMI) to get the info. I don't beleive share info is available in the System.IO namespace, but a quick check there could save you some time.

As far as opening a port on XP's port blocker... I'm not sure. If anything I would guess it would be an API call, but I have no idea on specifics. I'd say search MS's knowledge base for XP Firewall and API.

-Rick

VB.Net Forum forum796 forum855 ASP.NET Forum
[monkey]I believe in killer coding ninja monkeys.[monkey]
 
poping up the annoying "do you want to unblock the port" message

That's why it's there. If you do find a way to stop this message then you have found the next security flaw in XP.

Christiaan Baes
Belgium

I just like this --> [Wiggle] [Wiggle]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top