China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-12 13:33
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » How can I disable all shared folders on this machine? View 984 Replies 2
Original Poster Posted 2010-03-29 09:48 ·  中国 浙江 台州 电信
初级用户
Credits 88
Posts 34
Joined 2007-10-20 14:06
18-year member
UID 100256
Gender Male
Status Offline
Please advise me, experts, how to disable all shared folders on this machine.
My idea is like this:
First automatically list all shared folders on this machine,
then make a batch file
that can automatically disable all shared folders on this machine.
If needed later, use a batch file again to re-enable the folders that were previously shared.

I've been working on it for several days and still haven't made it perfect.
Could one of the experts give me some pointers!
Thanks !
Floor 2 Posted 2010-03-29 22:28 ·  中国 重庆 电信
版主
★★★★★
Credits 9,023
Posts 5,017
Joined 2007-05-31 19:39
19-year member
UID 89899
Gender Male
Status Offline
First post the incomplete thing you've written so we can take a look.
Floor 3 Posted 2010-03-31 11:32 ·  中国 四川 泸州 联通
高级用户
★★★
Credits 609
Posts 374
Joined 2006-08-02 22:38
20-year member
UID 59720
Status Offline
You can use 'registry snapshot comparison' Regshot.exe to first obtain the registry information. Without closing Regshot.exe, manually set the partition you want to share (you need to turn off the firewall). It can be set to full access mode (copying, writing, deleting, etc. allowed) or copy-only mode. Then get the second registry snapshot; it will automatically compare the results and save them as 设置共享.reg. Then compare in reverse against the registry information obtained earlier, and save that as 取消共享.reg.
Each time you import a different registry file, you can achieve your goal.
Forum Jump: