VMware安装MacOS-MK-unlocker

Last updated on 2 years ago

删除或注释 win-install.cmd line 9-23

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
chcp 850

net session >NUL 2>&1
if %errorlevel% neq 0 (
echo Administrator privileges required!
exit /b
)

echo.
set KeyName="HKLM\SOFTWARE\Wow6432Node\VMware, Inc.\VMware Player"
:: delims is a TAB followed by a space
for /F "tokens=2* delims= " %%A in ('REG QUERY %KeyName% /v InstallPath') do set InstallPath=%%B
echo VMware is installed at: %InstallPath%
for /F "tokens=2* delims= " %%A in ('REG QUERY %KeyName% /v ProductVersion') do set ProductVersion=%%B
echo VMware product version: %ProductVersion%

在line 24 添加 set InstallPath=VMware安装路径

1
set InstallPath=C:\Program Files (x86)\VMware\VMware Workstation\

在line 47、line 51改为调用python脚本破解:

1
2
python3 unlocker.py
python3 gettools.py

在line 29-32line中的VMware服务名字是错误的,需要修改正确服务名并加上双引号。

1
2
3
4
5
net stop "VMwareHostd" > NUL 2>&1
net stop "VMAuthdService" > NUL 2>&1
net stop "VMnetDHCP" > NUL 2>&1
net stop "VMUSBArbService" > NUL 2>&1
net stop "VMware NAT Service" > NUL 2>&1

修改line 57-line 60:

1
2
3
4
5
net start "VMware NAT Service" > NUL 2>&1
net start "VMnetDHCP" > NUL 2>&1
net start "VMAuthdService" > NUL 2>&1
net start "VMUSBArbService" > NUL 2>&1
net start "VMwareHostd" > NUL 2>&1

去除破解的 win-uninstall.cmd 也类似,修改相应的地方即可。

完整脚本下载地址:https://github.com/Kuibagit/Resource/blob/master/MK-unlocker.zip

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
@echo off
setlocal ENABLEEXTENSIONS
echo.
echo Unlocker 3.0.2 for VMware Workstation
echo =====================================
echo (c) Dave Parsons 2011-18
echo.
echo Set encoding parameters...
REM chcp 850

REM net session >NUL 2>&1
REM if %errorlevel% neq 0 (
REM echo Administrator privileges required!
REM pause
REM exit /b
REM )

echo.
set InstallPath=C:\Program Files (x86)\VMware\VMware Workstation
REM set KeyName="HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\VMware, Inc.\VMware Workstation"
REM :: delims is a TAB followed by a space
REM for /F "tokens=2* delims= " %%A in ("REG.exe QUERY %KeyName% /v InstallPath") do set InstallPath=%%B
REM echo VMware is installed at: %InstallPath%
REM for /F "tokens=2* delims= " %%A in ("REG.ex QUERY %KeyName% /v ProductVersion") do set ProductVersion=%%B
REM echo VMware product version: %ProductVersion%

pushd %~dp0

echo.
echo Stopping VMware services...
net stop "VMwareHostd" > NUL 2>&1
net stop "VMAuthdService" > NUL 2>&1
net stop "VMnetDHCP" > NUL 2>&1
net stop "VMUSBArbService" > NUL 2>&1
net stop "VMware NAT Service" > NUL 2>&1
taskkill /F /IM vmware-tray.exe > NUL 2>&1

echo.
echo Backing up files...
rd /s /q .\backup > NUL 2>&1
mkdir .\backup
mkdir .\backup\x64
xcopy /F /Y "%InstallPath%\x64\vmware-vmx.exe" .\backup\x64
xcopy /F /Y "%InstallPath%\x64\vmware-vmx-debug.exe" .\backup\x64
xcopy /F /Y "%InstallPath%\x64\vmware-vmx-stats.exe" .\backup\x64
xcopy /F /Y "%InstallPath%\vmwarebase.dll" .\backup\

echo.
echo Patching...
python3 unlocker.py

echo.
echo Getting VMware Tools...
python3 gettools.py
xcopy /F /Y .\tools\darwin*.* "%InstallPath%"

echo.
echo Starting VMware services...
net start "VMware NAT Service" > NUL 2>&1
net start "VMnetDHCP" > NUL 2>&1
net start "VMAuthdService" > NUL 2>&1
net start "VMUSBArbService" > NUL 2>&1
net start "VMwareHostd" > NUL 2>&1

popd
echo.
echo Finished!
pause

管理员权限运行 win-install.cmd 破解VMware

注意:

多次运行win-install.cmd,容易损坏VMware许可信息,损坏后需要卸载VMware再重新安装。

Reference

https://zhuanlan.zhihu.com/p/102534602


VMware安装MacOS-MK-unlocker
https://guosec.online/posts/84701d9e.html
Posted on
June 26, 2020
Updated on
July 2, 2022
Licensed under
本博客所有文章除特别声明外,均采用  协议,转载请注明出处!