WOW64下如何卸载IIS 7?
在我正在维护的 Web 服务器安装程序中,我们跟踪是否或 安装程序未安装 IIS 7 和/或 ASP(在 Vista 或更高版本下)并且 如果是的话,将适当的值保存到注册表中。 在卸载过程中,如果 值存在并且没有其他网站在该计算机上使用 IIS,用户 询问是否要删除 IIS/ASP。 如果是这样,我们删除所有内容 我们安装了。
以下是我们为了删除 IIS 7 和 ASP 而启动的命令 (为了清楚起见添加了换行符):
C:\Windows\system32\pkgmgr.exe /norestart /uu:IIS-WebServerRole;
IIS-WebServer;IIS-CommonHttpFeatures;IIS-StaticContent;
IIS-DefaultDocument;IIS-DirectoryBrowsing;IIS-HttpErrors;
IIS-ApplicationDevelopment;IIS-ASP;IIS-ISAPIExtensions;
IIS-HealthAndDiagnostics;IIS-HttpLogging;IIS-LoggingLibraries;
IIS-RequestMonitor;IIS-Security;IIS-RequestFiltering;
IIS-HttpCompressionStatic;IIS-WebServerManagementTools;
IIS-ManagementConsole;WAS-WindowsActivationService;
WAS-ProcessModel;WAS-NetFxEnvironment;WAS-ConfigurationAPI
这在 32 位系统上运行良好,但在 64 位系统上根本不起作用 系统,即使禁用了 WOW64 重定向。 (忽略/norestart 参数,因为安装程序会在安装结束时重新启动,如果 必要的。)我什至尝试将此命令输入到管理级命令中 提示(不带 /norestart 参数),但无济于事。
我们在安装过程中使用的安装 IIS 7/ASP 的命令类似 很长,而且总是有效,所以我无法想象问题是 卸载命令行太长。 (为了测试这个理论,我什至尝试过 将命令分成两个命令,一个仅删除 ASP 组件 然后再按一个来删除其余的。 同样的问题,没有删除任何内容。)
是否有其他命令可以在 64 位系统上执行我们想要的操作? 如果 那么,我们是否必须禁用 WOW64 重定向,它是否也适用于 32 位 系统? (它只会在 Vista 及更高版本的系统上调用。在更早的系统上 系统,我们依靠用户确保预安装 IIS 和 ASP。)
In a Web server installer that I'm maintaining, we keep track of whether or
not the installer had installed IIS 7 and/or ASP (under Vista or later) and
save an appropriate value to the Registry if so. During an uninstall, if that
value is there and no other Web sites are using IIS on that machine, the user
is asked whether or not IIS/ASP is to be removed. If so, we remove whatever
we installed.
The following is the command that we launch in order to remove IIS 7 and ASP
(line breaks added for clarity):
C:\Windows\system32\pkgmgr.exe /norestart /uu:IIS-WebServerRole;
IIS-WebServer;IIS-CommonHttpFeatures;IIS-StaticContent;
IIS-DefaultDocument;IIS-DirectoryBrowsing;IIS-HttpErrors;
IIS-ApplicationDevelopment;IIS-ASP;IIS-ISAPIExtensions;
IIS-HealthAndDiagnostics;IIS-HttpLogging;IIS-LoggingLibraries;
IIS-RequestMonitor;IIS-Security;IIS-RequestFiltering;
IIS-HttpCompressionStatic;IIS-WebServerManagementTools;
IIS-ManagementConsole;WAS-WindowsActivationService;
WAS-ProcessModel;WAS-NetFxEnvironment;WAS-ConfigurationAPI
This works fine on 32-bit systems but does not work at all on 64-bit
systems, even with WOW64 redirection disabled. (Ignore the /norestart
parameter, as the installer does a reboot at the end of the install if
necessary.) I've even tried entering this command into an admin-level command
prompt (without the /norestart parameter), but to no avail.
The command that we use during the install to install IIS 7/ASP is similarly
long, and it always works, so I can't imagine that the problem is that the
uninstall command line is too long. (To test that theory, I even tried
breaking the command into two commands, one to remove the ASP components only
followed by one to remove the rest. Same problem, nothing was removed.)
Is there some other command that would do what we want on 64-bit systems? If
so, do we have to disable WOW64 redirection, and will it also work on 32-bit
systems? (It will only be called on Vista and later systems. On earlier
systems, we rely on the user making sure that IIS and ASP are pre-installed.)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我不确定这是否适用于您的问题,但我多次被这样一个事实所困扰:访问 64 位 Windows 上的
HKEY_LOCAL_MACHINE\SOFTWARE
键的 32 位程序实际上会被重定向到 <代码> HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node 键。 如果混合使用 32 位和 64 位进程,64 位进程将不会具有与 32 位进程相同的注册表视图。I'm not sure this applies to your problem, but I have repeatedly been bitten by the fact that a 32 bit program that accesses the
HKEY_LOCAL_MACHINE\SOFTWARE
key on 64 bit Windows will actually be redirected to theHKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node
key. If you are mixing 32 and 64 bit processes the 64 bit process will not have the same view of registry as the 32 bit process.事实证明,我遇到的问题与 pkgmgr.exe 没有任何关系,除非您想在进行手动测试以了解其不起作用的原因时缺乏耐心。 在安装程序中,问题是安装脚本执行了某些操作,导致命令无法启动。 在手动测试的情况下,我只是没有等待命令完成运行足够长的时间。 (对于上述命令行,大约需要几分钟。)
As it turns out, the problem that I was having doesn't have anything to do with pkgmgr.exe, unless you want to count lack of patience when doing a manual test to see why it wasn't working. In the installer, the problem was the install script doing something that prevented the command from getting launched. In the case of the manual tests, I just wasn't waiting long enough for the command to finish running. (It takes about a couple of minutes, in the case of the above command line.)
我尝试了很多解决方案,包括上面给出的解决方案。 我无法在 Windows Enterprise x64 上删除 IIS 7
我最终重新安装了 IIS,然后禁用了 IIS 管理和万维网发布服务。
I have tried many solutions including the one given above. I simple cannot remove IIS 7 on Windows Enterprise x64
I finally ended up reinstalling IIS, and then disabling IIS Admin and World Wide Web publishing services.