内网如何实现跨路由器共享打印机

1.用记事本打开WINDOWSsystem32driversetc下的hosts文件,在末尾加上“192.168.0.74print-pc”(不要引号,"print-pc"要与之前服务端电脑名一致)版,保存权。

2.确保TCP/IPNetBIOSHelper服务开启及启动类型为自动。

3.打开开始=》设置=》打印机和传真,共享打印机。点添加打印机,

http://jingyan..com/article/6c67b1d6eb27df2787bb1ef2.html

㈡ 设置一键切换内网和WIFI的批处理

以下代码复制粘贴到记事本,另存为xx.bat,编码选ANSI
@echo off
rem 自动切换/禁用或启用无线和有线网络连接
color 3e
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
if '%errorlevel%' NEQ '0' (goto UACPrompt) else (goto gotAdmin)
:UACPrompt
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"
"%temp%\getadmin.vbs"
exit /B
:gotAdmin
if exist "%temp%\getadmin.vbs" (del "%temp%\getadmin.vbs")
cd /d "%~dp0"
set #=Any question&set @=WX&set $=Q&set/az=0x53b7e0b4
title %#% +%$%%$%/%@% %z%
set "n1=本地连接"
set "n2=无线网络连接"
set "f="
wmic NIC where "NetConnectionID='%n1%'" get NetConnectionStatus /value|>nul find "=0"&&(set f=1)
if defined f (
echo 关闭wifi,启用内网
netsh interface set interface name="%n2%" admin=disabled
netsh interface set interface name="%n1%" admin=enabled
) else (
echo 打开wifi,关闭内网
netsh interface set interface name="%n2%" admin=enabled
netsh interface set interface name="%n1%" admin=disabled
)
echo;%#% +%$%%$%/%@% %z%
pause
exit