VMware WorkStation安装时提示The MSI failed
以前安装过其他版本的VMware workstation卸载不完全造成的
先把所有VMware相关服务关闭,然后打开注册表,搜索所有VMware相关键值,删除掉,然后再安装就可以了
前提是你机器上没有需要用的其他VMware的软件,不然就会导致其他VMware软件报废
删除window服务命令
例如:sc delete TestService www.2cto.com
这个问题是我在安装虚拟机到windows时出现的,网上找了找解决方法,千篇一律,无非于以下两点:一是重装系统;二是不要用这种虚拟机换个虚拟 机。还有更甚者一些牛头不对马尾的解决方法,什么关闭防火墙、运用绿色版、破解文件...我是没有看懂。继而我感觉这个问题没有这么麻烦,也没有必要动不 动就和系统过不去,大小问题都重装系统。
因为当我打开Vmware安装软件的时候它提示我需要卸载以前的版本,但是我以前的已经卸载。按照安装提示走,去卸载就会出现
我想解决这个问题就是将以前卸载的残留文件删除干净,就可以了。
所以我就按照我这个思路去清理下系统中残留的VmwareWorkstaton文件。
一、打开 计算机->管理->服务,果然发现VMware的服务还存在
在服务管理中停止以下服务(VM*)
VMware Authentication Service
VMware Registration Service
VMware DHCP Service
VMware NAT Service
二、卸载VMware安装的设备 计算机->管理 -> 设备管理器 -> 查看 -> 显示隐藏的设备 -> 非即插即用驱动程序 删除以下程序
VMware hcmon
VMware Network Application Interface
VMparport vmx86
VMware Bridge Protocol
三、 清除注册表 运行->regedit->编辑->查找->"vmware" 结果全部删除!清除C盘C:/Program Files/VMware|C:/Windows/System32&&C:/Windows/System32/drivers中和 VM有关的,实在难以区分的查看其属性
四、计算机->管理 -> 本地用户组管理->删除__vmware_user__用户和__vmware__用户组
五、重启计算机
六、重新以管理员权限安装VMware-workstation-full-7.1.3-324285
直接选择修复模式!
大功告成!使用一切正常!
新建 卸载.cmd 文件
cls
@echo off
CLS
color 0a
Title 卸载 VMware
set vmbit=
if "%PROCESSOR_ARCHITECTURE%" neq "x86" set vmbit=64
echo 你确定要卸载 VMware 吗?
echo 按任意键继续卸载 VMware !!!&pause>nul
echo 正在删除服务和设备,可能需要几分钟,请稍后...
echo 如果三分钟后还没动静,请在卸载批处理上敲一下回车键后继续等待...
vnetlib%vmbit%.exe -- stop authd >nul 2>nul
vnetlib%vmbit%.exe -- uninstall authd >nul 2>nul
net stop VMAuthdService >nul 2>nul
sc delete VMAuthdService >nul 2>nul
net stop VMwareHostd >nul 2>nul
sc delete VMwareHostd >nul 2>nul
vnetlib%vmbit%.exe -- stop dhcp >nul 2>nul
vnetlib%vmbit%.exe -- uninstall dhcp >nul 2>nul
vnetlib%vmbit%.exe -- stop nat >nul 2>nul
vnetlib%vmbit%.exe -- uninstall nat >nul 2>nul
vnetlib%vmbit%.exe -- stop bridge >nul 2>nul
vnetlib%vmbit%.exe -- uninstall bridge >nul 2>nul
vnetlib%vmbit%.exe -- stop userif >nul 2>nul
vnetlib%vmbit%.exe -- uninstall userif >nul 2>nul
vnetlib%vmbit%.exe -- stop adapter >nul 2>nul
vnetlib%vmbit%.exe -- uninstall adapter >nul 2>nul
rundll32 vnetlib%vmbit%.dll,VNL_RemoveAllNetworkDevices
net stop VMUSBArbService >nul 2>nul
sc delete VMUSBArbService >nul 2>nul
vnetlib%vmbit%.exe -- stop usb
vnetlib%vmbit%.exe -- uninstall usb
vnetlib%vmbit%.exe -- stop hcmon >nul 2>nul
vnetlib%vmbit%.exe -- uninstall hcmon >nul 2>nul
net stop vstor2-mntapi10-shared >nul 2>nul
sc delete vstor2-mntapi10-shared >nul 2>nul
vnetlib%vmbit%.exe -- stop vmkbd >nul 2>nul
vnetlib%vmbit%.exe -- uninstall vmkbd >nul 2>nul
net stop vmkbd >nul 2>nul
sc delete vmkbd >nul 2>nul
vnetlib%vmbit%.exe -- stop vmparport >nul 2>nul
vnetlib%vmbit%.exe -- uninstall vmparport >nul 2>nul
ver|find "5.">nul && (DrvInst.exe -uninstall "ROOT\VMWVMCIHOSTDEV" 0 >nul 2>nul)
ver|find "6.">nul && (devcon%vmbit%.exe remove "ROOT\VMWVMCIHOSTDEV" >nul 2>nul)
vnetlib%vmbit%.exe -- stop vsock >nul 2>nul
net stop vsock >nul 2>nul
sc delete vsock >nul 2>nul
vnetlib%vmbit%.exe -- stop vmx86 >nul 2>nul
vnetlib%vmbit%.exe -- uninstall vmx86 >nul 2>nul
vnetlib%vmbit%.exe -- uninstall vmci
echo.
echo 取消DLL文件的注册...
regsvr32 /u /s "%cd%\vmappcfg.dll"
regsvr32 /u /s "%cd%\vmappsdk.dll"
regsvr32 /u /s "%cd%\vmdbCOM.dll"
echo.
echo 删除注册表....
reg delete "HKEY_CURRENT_USER\SOFTWARE\ThinPrint" /f >nul 2>nul
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\ThinPrint" /f >nul 2>nul
reg delete "HKEY_CURRENT_USER\SOFTWARE\VMware, Inc." /f >nul 2>nul
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\VMware, Inc." /f >nul 2>nul
reg delete "HKEY_CURRENT_USER\Software\Wow6432Node\VMware, Inc." /f >nul 2>nul
reg delete "HKEY_LOCAL_MACHINE\Software\Wow6432Node\VMware, Inc." /f >nul 2>nul
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Drivers32" /f /v "VIDC.VMnc" >nul 2>nul
reg delete "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\VMware" /f >nul 2>nul
echo.
echo 删除文件...
rmdir /s /q "%AllUsersProfile%\Application Data\VMware" >nul 2>nul
rmdir /s /q "%AppData%\VMware" >nul 2>nul
rmdir /s /q "%CommonProgramFiles%\VMware" >nul 2>nul
IF "%PROCESSOR_ARCHITECTURE%" neq "x86" rmdir /s /q "%CommonProgramFiles(x86)%\VMware" >nul 2>nul
del /f /q "%WinDir%\system32\vmnc.dll" >nul 2>nul
del /f /q "%WinDir%\SysWOW64\vmnc.dll" >nul 2>nul
del /f /q "%WinDir%\system32\vnetinst.dll" >nul 2>nul
del /f /q "%WinDir%\system32\vnetlib*.dll" >nul 2>nul
del /f /q "%windir%\system32\drivers\vstor2-mntapi10-shared.sys" >nul 2>nul
del /f /q "%WinDir%\SysWOW64\drivers\vstor2-mntapi10-shared.sys" >nul 2>nul
del /f /q "%AllUsersProfile%\桌面\VMware.lnk" >nul 2>nul
del /f /q "%AllUsersProfile%\Desktop\VMware.lnk" >nul 2>nul
del /f /q "%USERPROFILE%\桌面\VMware.lnk" >nul 2>nul
del /f /q "%USERPROFILE%\Desktop\VMware.lnk" >nul 2>nul
del /f /q "%WinDir%\system32\drivers\vmnet*.sys" >nul 2>nul
del /f /q "%WinDir%\system32\drivers\vmparport.sys" >nul 2>nul
del /f /q "%WinDir%\system32\drivers\VMkbd.sys" >nul 2>nul
del /f /q "%WinDir%\system32\drivers\vmx86.sys" >nul 2>nul
del /f /q "%WinDir%\system32\drivers\vmusb.sys" >nul 2>nul
del /f /q "%WinDir%\system32\drivers\vmci.sys" >nul 2>nul
del /f /q "%WinDir%\system32\vmnetdhcp.exe" >nul 2>nul
del /f /q "%WinDir%\system32\vmnat.exe" >nul 2>nul
del /f /q "%WinDir%\system32\vmnetbridge.dll" >nul 2>nul
del /f /q "%WinDir%\SysWOW64\vmnetdhcp.exe" >nul 2>nul
del /f /q "%WinDir%\SysWOW64\vmnat.exe" >nul 2>nul
echo.
echo 删除 __vmware_user__ 账户和用户组 ...
net localgroup users __vmware_user__ /del >nul 2>nul
net localgroup __vmware__ /del >nul 2>nul
net user __vmware_user__ /del >nul 2>nul
echo.
echo 恢复配置文件...
ver|find "6.">nul && (set profilepath=%AllUsersProfile%)
ver|find "5.">nul && (set profilepath=%AllUsersProfile%\Application Data)
start /wait str.exe preferences.ini 0 0 /R /asc:"%cd%" /asc:"VMwareDir" /A >nul 2>nul
start /wait str.exe environments.xml 0 0 /R /asc:"%cd%" /asc:"VMwareDir" /A >nul 2>nul
start /wait str.exe "%profilepath%\VMware\hostd\config.xml" 0 0 /R /asc:"%cd%" /asc:"VMwareDir" /A >nul 2>nul
start /wait str.exe "%profilepath%\VMware\hostd\datastores.xml" 0 0 /R /asc:"%cd%" /asc:"VMwareDir" /A >nul 2>nul
start /wait str.exe "%profilepath%\VMware\hostd\stats\hostAgentStats.xml" 0 0 /R /asc:"%profilepath%\VMware" /asc:"hostdDir" /A >nul 2>nul
start /wait str.exe "%profilepath%\VMware\hostd\config.xml" 0 0 /R /asc:"%profilepath%\VMware" /asc:"hostdDir" /A >nul 2>nul
net stop "VMware NAT Service" >nul 2>nul&&sc delete "VMware NAT Service" >nul 2>nul
net stop VMnetDHCP >nul 2>nul&&sc delete VMnetDHCP >nul 2>nul
net stop VMnetAdapter >nul 2>nul&&sc delete VMnetAdapter >nul 2>nul
net stop vmusb >nul 2>nul&&sc delete vmusb >nul 2>nul
net stop VMnetBridge >nul 2>nul&&sc delete VMnetBridge >nul 2>nul
net stop vmci >nul 2>nul&&sc delete vmci >nul 2>nul
echo.
sc delete "vstor2-mntapi10-shared" >nul 2>nul
sc delete "VMparport" >nul 2>nul
sc delete VMUSBArbService >nul 2>nul
sc delete VMnetDHCP >nul 2>nul
sc delete "VMware NAT Service" >nul 2>nul
sc delete VMAuthdService >nul 2>nul
sc delete VMnetuserif >nul 2>nul
sc delete VMnetAdapter >nul 2>nul
sc delete vmkbd >nul 2>nul
sc delete vmx86 >nul 2>nul
echo.
pause>nul|echo 卸载完成,最好重新启动一下计算机,因为有些驱动可能需要重启后才能删除......
exit