Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Sharing Folders

Posted on 2003-03-15
Medium Priority
Last Modified: 2008-02-01
Can I share / unshare windows folders using a C# program?
Question by:sumitamar
1 Comment

Accepted Solution

martinv earned 200 total points
ID: 8375303
Yes, you could. There are several ways how to accomplish it.

1) call external cmd.exe, and let it carry command "net share xxxx"

2) use WNetAddConnection via p/invoke api. Example could be found here:


Martin Vobr

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Integration Management Part 2
Suggested Courses

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question