📎 AI Summary:
The thread discusses how to completely unshare a folder in Windows when disabling sharing via the GUI still leaves it listed as shared. Contributors suggest workarounds such as copying the folder elsewhere or checking security settings, but the most straightforward official solution provided is using the command line command `net share ShareName /delete` to remove the share entirely. Overall, the discussion centers on confirming that command as the proper way to fully unshare a folder, emphasizing that GUI options may not always fully remove sharing status.

pstein

Extraordinary Member
Joined
Mar 20, 2010
Messages
454
Thread Author #1
In the past I setup a network share for a local folder by

right-clicking on that folder in WinExp
click "Properties"
click "Sharing" tab
click "Advanced Sharing"
activate checkbox "Share this folder"
assigning my user account to the list of permissions
removing "Everyone" access.

This works fine.

However now I want to completely unshare this folder
So I went to "Advanced sharing" and disabled the checkbox "Share this folder"
and clicked Apply + ok.

Much to my surprise in the "Sharing" tab this folder is still declared as "shared"

Why this?

How can I really unshare this folder? Just as if I never declared a share.
Do I really have to re-assign "Everyone" to this folder?

Is there a command line cmd to remove sharing and to re-establish initial state?
Something like

removeshare.exe "D:\tools\myfolder\"

Thx
Peter
 

Solution
Use the following at a command prompt with Administrator privileges:

net share

Grab the "share name" and issue

net share ShareName /delete

Tada, it's gone!

Pauli

Fantastic Member
Premium Supporter
Joined
Mar 1, 2012
Messages
2,486
It may be a simple glitch. You could copy the contents of that folder to a new folder, preferably with a new name, and then after checking it's all there, delete the old folder. Copying the entire folder may cause links to follow, but copying the contents should kill trails. Unless there are id files of some sort.
 

pstein

Extraordinary Member
Joined
Mar 20, 2010
Messages
454
Thread Author #3
You could copy the contents of that folder to a new folder, preferably with a new name, and then after checking it's all there, delete the old folder. Copying the entire folder may cause links to follow, but copying the contents should kill trails. Unless there are id files of some sort.

Hmm, I cannot believe that this is the official way of removing a folder share.

There must be an offical "remove all share from this folder" button.or cmdline command

Where is it?
 

Saltgrass

Excellent Member
Microsoft Community Contributor
Joined
Oct 16, 2009
Messages
15,152
Is this shared folder inside the Library? If so, have you checked the actual folder set it to no sharing? Is it in a Public folder?

But the folders I see show a option with a lock for share with nobody. That isn't working?

You might also check the Advanced Security settings for the folder. There may be entries there which could effect the situation.

If none of that works, you might try turning off File and Printer sharing in the Advanced Sharing options, unshare the folder again, then turn file and printer sharing back on.
 

Josephur

Windows Forum Admin
Staff member
Premium Supporter
Microsoft Certified Professional
Joined
Aug 3, 2010
Messages
1,283
Use the following at a command prompt with Administrator privileges:

net share

Grab the "share name" and issue

net share ShareName /delete

Tada, it's gone!
 

Solution