![]() |
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-06 19:47 |
48,039 topics / 350,124 posts / today 0 new / 48,252 members |
| DOS批处理 & 脚本技术(批处理室) » Two computers are interconnected in a local area network, thank you! |
| Printable Version 1,519 / 7 |
| Floor1 junchen2 | Posted 2007-11-11 22:58 |
| 高级用户 Posts 219 Credits 537 From 杭州--半山 | |
|
How to implement the command for two computers to be interconnected in a local area network, and the method to add to Network Neighborhood, that is, to be able to see the other party in Network Neighborhood. Thank you very much!!!
[ Last edited by junchen2 on 2007-11-12 at 12:25 PM ] |
|
| Floor2 afeichai | Posted 2007-11-12 09:02 |
| 初级用户 Posts 78 Credits 171 | |
|
Red Maple Leaf's
@ ECHO OFF color 1b title Enable LAN Sharing @ ECHO. @ ECHO. Instructions @ ECHO -------------------------------------------------------------------- @ ECHO After executing this batch processing, the following settings will be made: @ ECHO 1. Allow anonymous enumeration of SAM accounts and shares @ ECHO 2. If the local account has an empty password, allow other machines to access this machine. @ ECHO 3. Windows Firewall: Allow file and printer sharing. @ ECHO 4. Sharing method: Local users authenticate as guests. @ ECHO 5. Guest account: Enable. @ ECHO. @ ECHO With this sharing method, other machines can access this machine without entering a username or password. For example, in a home LAN where everyone is trustworthy, use this method. @ ECHO. @ ECHO No matter which sharing method is used, sharing is only for internal use. In the case of using a router to access the Internet, the external network cannot access your machine, so there is no need to worry about being invaded if sharing is enabled. You only need to remember that when dialing up alone, do not enable sharing. @ ECHO -------------------------------------------------------------------- for /l %%i in (1,1,10000) do @echo %%i>nul reg add HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Lsa /v "restrictanonymous" /t REG_DWORD /d 0x00000000 /F>nul reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa /v "restrictanonymous" /t REG_DWORD /d 0x00000000 /F>nul reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa /v "limitblankpassworduse" /t REG_DWORD /d 0x00000000 /F>nul reg add HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Lsa /v "limitblankpassworduse" /t REG_DWORD /d 0x00000000 /F>nul reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List /v "445:TCP" /d "445:TCP:LocalSubNet:Enabled:@xpsp2res.dll,-22005" /F>nul reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List /v "137:UDP" /d "137:UDP:LocalSubNet:Enabled:@xpsp2res.dll,-22001" /F>nul reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List /v "138:UDP" /d "138:UDP:LocalSubNet:Enabled:@xpsp2res.dll,-22002" /F>nul reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List /v "139:TCP" /d "139:TCP:LocalSubNet:Enabled:@xpsp2res.dll,-22004" /F>nul reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Epoch /v "Epoch" /t REG_DWORD /d 0x000001ED /F>nul reg add HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Print\Providers /v "LogonTime" /t REG_BINARY /d E8318E4F6495C601 /F>nul reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List /v "445:TCP" /d "445:TCP:LocalSubNet:Enabled:@xpsp2res.dll,-22005" /F>nul reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List /v "137:UDP" /d "137:UDP:LocalSubNet:Enabled:@xpsp2res.dll,-22001" /F>nul reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List /v "138:UDP" /d "138:UDP:LocalSubNet:Enabled:@xpsp2res.dll,-22002" /F>nul reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List /v "139:TCP" /d "139:TCP:LocalSubNet:Enabled:@xpsp2res.dll,-22004" /F>nul reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Epoch /v "Epoch" /t REG_DWORD /d 0x000001ED /F>nul reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa /v "forceguest" /t REG_DWORD /d 0x00000001 /F>nul cls @ ECHO. @ ECHO -------------------------------------------------------------------- @ ECHO Operation completed. @ ECHO Note: It will take effect after this machine restarts. @ ECHO. @ ECHO -------------------------------------------------------------------- @ ECHO. @ ECHO Supplementary questions and answers: @ ECHO If the previous sharing method was "Local users authenticate as themselves" when sharing a folder, @ ECHO then when switching to authenticating as a guest and then accessing that folder, an error will pop up: Cannot access, you do not have permission to use the network resource. The solution is to cancel the original sharing properties of that folder, and then share it again. @ ECHO -------------------------------------------------------------------- for /l %%i in (1,1,10000) do @echo %%i>nul [ Last edited by afeichai on 2007-11-12 at 09:09 AM ] |
|
| Floor3 afeichai | Posted 2007-11-12 09:04 |
| 初级用户 Posts 78 Credits 171 | |
|
@ECHO OFF
color 1b title Enable LAN Sharing @ECHO. @ECHO. Description @ECHO -------------------------------------------------------------------- @ECHO After executing this batch script, the following settings will be made: @ECHO 1. Allow anonymous enumeration of SAM accounts and shares ( @ECHO 2. If the local account has an empty password, allow other machines to access this machine. @ECHO 3. Windows Firewall: Allow file and printer sharing. @ECHO 4. Sharing method: Local users authenticate with their own identities. @ECHO 5. Guest account: Not enabled. @ECHO. @ECHO With this sharing method, you must enter the correct username and password to access this machine when visiting. @ECHO. @ECHO Regardless of which sharing method is used, sharing is only for internal use. In the case of using a router to access the Internet, @ECHO the external network cannot access your machine, so there is no need to worry about being hacked if shared. You only need to remember that when dialing up with a single computer, @ECHO do not turn on sharing. @ECHO -------------------------------------------------------------------- for /l %%i in (1,1,10000) do @echo %%i>nul reg add HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Lsa /v "restrictanonymous" /t REG_DWORD /d 0x00000000 /F>nul reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa /v "restrictanonymous" /t REG_DWORD /d 0x00000000 /F>nul reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa /v "limitblankpassworduse" /t REG_DWORD /d 0x00000000 /F>nul reg add HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Lsa /v "limitblankpassworduse" /t REG_DWORD /d 0x00000000 /F>nul reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List /v "445:TCP" /d "445:TCP:LocalSubNet:Enabled:@xpsp2res.dll,-22005" /F>nul reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List /v "137:UDP" /d "137:UDP:LocalSubNet:Enabled:@xpsp2res.dll,-22001" /F>nul reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List /v "138:UDP" /d "138:UDP:LocalSubNet:Enabled:@xpsp2res.dll,-22002" /F>nul reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List /v "139:TCP" /d "139:TCP:LocalSubNet:Enabled:@xpsp2res.dll,-22004" /F>nul reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Epoch /v "Epoch" /t REG_DWORD /d 0x000001ED /F>nul reg add HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Print\Providers /v "LogonTime" /t REG_BINARY /d E8318E4F6495C601 /F>nul reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List /v "445:TCP" /d "445:TCP:LocalSubNet:Enabled:@xpsp2res.dll,-22005" /F>nul reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List /v "137:UDP" /d "137:UDP:LocalSubNet:Enabled:@xpsp2res.dll,-22001" /F>nul reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List /v "138:UDP" /d "138:UDP:LocalSubNet:Enabled:@xpsp2res.dll,-22002" /F>nul reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List /v "139:TCP" /d "139:TCP:LocalSubNet:Enabled:@xpsp2res.dll,-22004" /F>nul reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Epoch /v "Epoch" /t REG_DWORD /d 0x000001ED /F>nul reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa /v "forceguest" /t REG_DWORD /d 0x00000000 /F>nul cls @ECHO. @ECHO ------------------------------------------------ @ECHO Operation completed. @ECHO Note: It will take effect only after the machine is restarted. @ECHO. @ECHO ------------------------------------------------------------------- @ECHO. @ECHO Common Questions: @ECHO If after modification, accessing this machine still does not prompt for account and password, it is because the account names of other computers are the same as this machine's (for example, both are administrator), and this machine has no password, so it directly enters. You should rename the local account or set a password. Unauthorized users will not be able to randomly access the resources you shared. @ECHO ------------------------------------------------------------------- for /l %%i in (1,1,10000) do @echo %%i>nul [ Last edited by afeichai on 2007-11-12 at 09:09 AM ] |
|
| Floor4 afeichai | Posted 2007-11-12 09:04 |
| 初级用户 Posts 78 Credits 171 | |
|
@ECHO OFF
color 1b title Close LAN Sharing @ECHO. @ECHO. INSTRUCTIONS @ECHO ---------------------------------------------------------- @ECHO After executing this batch script, the following settings will be made: @ECHO 1. Disable anonymous enumeration of SAM accounts and shares (originally allowed in default systems). @ECHO 2. Do not allow other machines to access this machine if the local account has an empty password. @ECHO 3. Windows Firewall: Do not allow file and printer sharing. @ECHO 4. Guest account: Disable. @ECHO. @ECHO If you do not often need to transfer files within the LAN, you can close the sharing function to improve @ECHO security. Especially users who dial up to the Internet with a single computer should close the sharing. @ECHO ---------------------------------------------------------- for /l %%i in (1,1,5000) do @echo %%i>nul reg add HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Lsa /v restrictanonymous /t REG_DWORD /d 0x00000001 /F>nul reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa /v restrictanonymous /t REG_DWORD /d 0x00000001 /F>nul reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa /v limitblankpassworduse /t REG_DWORD /d 0x00000001 /F>nul reg add HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Lsa /v limitblankpassworduse /t REG_DWORD /d 0x00000001 /F>nul reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List /v "445:TCP" /d "445:TCP:LocalSubNet:Disabled:@xpsp2res.dll,-22005" /F>nul reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List /v "137:UDP" /d "138:UDP:LocalSubNet:Disabled:@xpsp2res.dll,-22001" /F>nul reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List /v "138:UDP" /d "138:UDP:LocalSubNet:Disabled:@xpsp2res.dll,-22002" /F>nul reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List /v "139:TCP" /d "139:TCP:LocalSubNet:Disabled:@xpsp2res.dll,-22004" /F>nul reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Epoch /v Epoch /t REG_DWORD /d 0x000001FC /F>nul reg add HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List /v "445:TCP" /d "445:TCP:LocalSubNet:Disabled:@xpsp2res.dll,-22005" /F>nul reg add HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List /v "137:UDP" /d "137:UDP:LocalSubNet:Disabled:@xpsp2res.dll,-22001" /F>nul reg add HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List /v "138:UDP" /d "138:UDP:LocalSubNet:Disabled:@xpsp2res.dll,-22002" /F>nul reg add HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List /v "139:TCP" /d "139:TCP:LocalSubNet:Disabled:@xpsp2res.dll,-22004" /F>nul reg add HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\SharedAccess\Epoch /v Epoch /t REG_DWORD /d 0x000001FC /F>nul cls @ECHO. @ECHO ---------------------------------------------------------- @ECHO Operation completed. @ECHO No restart is required, the settings have taken effect. @ECHO ---------------------------------------------------------- for /l %%i in (1,1,10000) do @echo %%i>nul exit |
|
| Floor5 junchen2 | Posted 2007-11-12 10:41 |
| 高级用户 Posts 219 Credits 537 From 杭州--半山 | |
|
Thanks, brother. I'll give it a try.
|
|
| Floor6 junchen2 | Posted 2007-11-12 11:12 |
| 高级用户 Posts 219 Credits 537 From 杭州--半山 | |
|
Thanks again to brother afeichai, the modification was successful, thank you!!!
|
|
| Floor7 junchen2 | Posted 2007-11-12 11:14 |
| 高级用户 Posts 219 Credits 537 From 杭州--半山 | |
|
Thanks again, successful!!!
|
|
| Floor8 qq82015930 | Posted 2007-12-08 13:16 |
| 中级用户 Posts 109 Credits 235 | |
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |