?
Solved

Sharing Folders

Posted on 2003-03-15
1
Medium Priority
?
1,024 Views
Last Modified: 2008-02-01
Can I share / unshare windows folders using a C# program?
0
Comment
Question by:sumitamar
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 6

Accepted Solution

by:
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:

http://groups.google.com/groups?hl=cs&lr=&ie=UTF-8&oe=UTF-8&threadm=%23EeJjAhgBHA.1788%40tkmsftngp05&rnum=11&prev=/groups%3Fq%3Dshare%2Bfolder%2BC%2523%26hl%3Dcs%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26start%3D10%26sa%3DN

Martin Vobr
http://www.rebex.net/ftp.net/
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses
Course of the Month15 days, 7 hours left to enroll

741 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