![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-08-07 18:47 |
48,041 topics / 350,128 posts / today 3 new / 48,252 members |
| DOS批处理 & 脚本技术(批处理室) » [Help] Use a script or batch file to remove File and Printer Sharing for Microsoft Networks |
| Printable Version 1,317 / 9 |
| Floor1 ronin | Posted 2007-04-22 23:44 |
| 中级用户 Posts 111 Credits 421 | |
|
By default, XP installs File and Printer Sharing for Microsoft Networks on the local connection. It has a big impact on security and startup speed for home users. I’m planning to use a batch file to deal with the registry issue, so I’d like to see whether anyone has experience with this.
|
|
| Floor2 slore | Posted 2007-04-23 00:08 |
| 铂金会员 Posts 2,478 Credits 5,212 | |
|
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\RemoteComputer\NameSpace
There’s a print under it, see if that’s it... If you turn that off, it seems sharing won’t work, right? If it’s for yourself, try uninstalling the protocol and see whether that works? |
|
| Floor3 ronin | Posted 2007-04-23 03:35 |
| 中级用户 Posts 111 Credits 421 | |
|
That should be wrong.
I’m planning to write a batch file to control whether sharing is enabled. If the protocol is uninstalled, that won’t work. |
|
| Floor4 flyinspace | Posted 2007-04-23 04:09 |
| 银牌会员 Posts 517 Credits 1,206 | |
|
Just stop a few services...
net stop "the service you want to stop" nc stop "the service you want to stop“ net start "the service you want to start“ Just a few lines. |
|
| Floor5 vkill | Posted 2007-04-24 00:09 |
| 金牌会员 Posts 1,744 Credits 4,103 From 甘肃.临泽 | |
|
You might as well just toggle lanmanserver.
|
|
| Floor6 ronin | Posted 2007-04-24 03:38 |
| 中级用户 Posts 111 Credits 421 | |
|
It has a big impact on startup speed too, it will increase startup time by 67 seconds.
|
|
| Floor7 bjsh | Posted 2007-04-24 04:08 |
| 银牌会员 Posts 621 Credits 2,000 | |
|
sc stop Spooler
sc config Spooler start= disabled You can also turn off the server service sc stop lanmanserver sc config lanmanserver start= disabled |
|
| Floor8 eech | Posted 2007-04-29 12:43 |
| 高级用户 Posts 346 Credits 906 | |
Originally posted by bjsh at 2007-4-24 04:08: I tested it myself, no! |
|
| Floor9 fhcweb | Posted 2008-03-08 16:48 |
| 新手上路 Posts 8 Credits 14 | |
|
I’ve also been looking for a solution to this problem for a long time, and there still hasn’t been any suitable solution, other than uninstalling it manually!
|
|
| Floor10 fhcweb | Posted 2008-03-08 18:06 |
| 新手上路 Posts 8 Credits 14 | |
|
Found it already, but it still needs a bit more work!
Dim WshSHell On Error Resume Next Set WshSHell = WScript.CreateObject("WScript.Shell") WshSHell.Run "control.exe ncpa.cpl" WScript.Sleep 500 WshSHell.SendKeys "{DOWN}{UP}" WScript.Sleep 500 WshSHell.SendKeys "%FR" WScript.Sleep 500 WshSHell.SendKeys "{DOWN}{ }" WScript.Sleep 500 WshSHell.SendKeys "%U" WScript.Sleep 500 WshSHell.SendKeys "Y" WScript.Sleep 10000 WshSHell.SendKeys "{TAB 5}{Enter}" WScript.Sleep 3000 WshSHell.SendKeys "%FC" Set WshSHell = Nothing WScript.Quit [ Last edited by fhcweb on 2008-3-8 at 06:22 PM ] |
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |