Windows Firewall/Internet Connection Sharing (ICS)的删除与重新安装

濮泳
2023-12-01

Windows Firewall/Internet Connection Sharing (ICS)的删除与重新安装

前一段时间,在开发一个网络应用教室的学生端时,因为学生注销机器后再进入桌面,会出现提示框,让学生阻止了客户端,不能达到软件应有的功能。考虑到只有删除ICS才能永久地得到这一便利。

开始-运行-CMD-确定,打开命令行窗口,输入命令 sc delete sharedaccess确认后便可删除ICS服务。

由于在服务器上试了一下,ICS便被删除了,但后来在添加“路由器”时,系统又需要ICS,用SC create 时创建ICS服务,但失败,系统提示找不到指定文件。后在网上找到了如下的解决方法。

1、打开记事本,输入如下代码:

Windows Registry Editor Version 5.00

 

[-HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/SharedAccess]

 

[HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/SharedAccess]

"DependOnGroup"=hex(7):00,00

"DependOnService"=hex(7):4e,00,65,00,74,00,6d,00,61,00,6e,00,00,00,57,00,69,00,/

6e,00,4d,00,67,00,6d,00,74,00,00,00,00,00

"Description"="Provides network address translation, addressing, name resolution and/or intrusion prevention services for a home or small office network."

"DisplayName"="Windows Firewall/Internet Connection Sharing (ICS)"

"ErrorControl"=dword:00000001

"ImagePath"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00, 6f ,00, 6f ,00,/

74,00,25,00, 5c ,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00, 5c ,00,73,/

00,76,00,63,00,68,00, 6f ,00,73,00,74,00,2e,00,65,00,78,00,65,00,20,00,2d,00,/

6b,00,20,00,6e,00,65,00,74,00,73,00,76,00,63,00,73,00,00,00

"ObjectName"="LocalSystem"

"Start"=dword:00000002

"Type"=dword:00000020

 

[HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/SharedAccess/Epoch]

"Epoch"=dword:00002cd0

 

[HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/SharedAccess/Parameters]

"ServiceDll"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00, 6f ,00, 6f ,/

00,74,00,25,00, 5c ,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00, 5c ,00,/

69,00,70,00,6e,00,61,00,74,00,68,00, 6c ,00,70,00,2e,00,64,00, 6c ,00, 6c ,00,00,/

  00

 

[HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/SharedAccess/Parameters/FirewallPolicy]

 

[HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/SharedAccess/Parameters/FirewallPolicy/DomainProfile]

 

[HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/SharedAccess/Parameters/FirewallPolicy/DomainProfile/AuthorizedApplications]

 

[HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/SharedAccess/Parameters/FirewallPolicy/DomainProfile/AuthorizedApplications/List]

"%windir%//system32//sessmgr.exe"="%windir%//system32//sessmgr.exe:*:enabled:@xpsp2res.dll,-22019"

 

[HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/SharedAccess/Parameters/FirewallPolicy/StandardProfile]

 

[HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/SharedAccess/Parameters/FirewallPolicy/StandardProfile/AuthorizedApplications]

 

[HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/SharedAccess/Parameters/FirewallPolicy/StandardProfile/AuthorizedApplications/List]

"%windir%//system32//sessmgr.exe"="%windir%//system32//sessmgr.exe:*:enabled:@xpsp2res.dll,-22019"

 

[HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/SharedAccess/Setup]

"ServiceUpgrade"=dword:00000001

 

[HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/SharedAccess/Setup/InterfacesUnfirewalledAtUpdate]

"All"=dword:00000001

 

[HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/SharedAccess/Enum]

"0"="Root//LEGACY_SHAREDACCESS//0000"

"Count"=dword:00000001

"NextInstance"=dword:00000001

 

2、保存为Sharedaccess.reg

3、双击“Sharedaccess.reg”以将此文件导入到注册表中,并重启机器。

4、打开命令行窗口,输入 netsh firewall reset.

5、打开服务管理器,看一看,是不是搞定了。

 类似资料: