Windows commands fixed to work with Player plus cosmetic changes to output.

This commit is contained in:
Dave Parsons 2018-10-20 17:29:27 +01:00
parent b218a2f06d
commit 5aa7936fa7
3 changed files with 45 additions and 20 deletions

View File

@ -1,25 +1,30 @@
@echo off @echo off
setlocal ENABLEEXTENSIONS setlocal ENABLEEXTENSIONS
echo.
echo Unlocker 3.0.2 for VMware Workstation echo Unlocker 3.0.2 for VMware Workstation
echo ===================================== echo =====================================
echo (c) Dave Parsons 2011-18 echo (c) Dave Parsons 2011-18
echo.
echo Set encoding parameters... echo Set encoding parameters...
chcp 850 chcp 850
net session >NUL 2>&1 net session >NUL 2>&1
if %errorlevel% neq 0 ( if %errorlevel% neq 0 (
echo Administrator privileges required! echo Administrator privileges required!
exit exit /b
) )
pushd %~dp0 echo.
set KeyName="HKLM\SOFTWARE\Wow6432Node\VMware, Inc.\VMware Player"
set KeyName="HKLM\SOFTWARE\Wow6432Node\VMware, Inc.\VMware Workstation"
:: delims is a TAB followed by a space :: delims is a TAB followed by a space
for /F "tokens=2* delims= " %%A in ('REG QUERY %KeyName% /v InstallPath') do set InstallPath=%%B for /F "tokens=2* delims= " %%A in ('REG QUERY %KeyName% /v InstallPath') do set InstallPath=%%B
echo VMware is installed at: %InstallPath% 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%
pushd %~dp0
echo.
echo Stopping VMware services... echo Stopping VMware services...
net stop vmware-view-usbd > NUL 2>&1 net stop vmware-view-usbd > NUL 2>&1
net stop VMwareHostd > NUL 2>&1 net stop VMwareHostd > NUL 2>&1
@ -27,6 +32,7 @@ net stop VMAuthdService > NUL 2>&1
net stop VMUSBArbService > NUL 2>&1 net stop VMUSBArbService > NUL 2>&1
taskkill /F /IM vmware-tray.exe > NUL 2>&1 taskkill /F /IM vmware-tray.exe > NUL 2>&1
echo.
echo Backing up files... echo Backing up files...
rd /s /q .\backup > NUL 2>&1 rd /s /q .\backup > NUL 2>&1
mkdir .\backup mkdir .\backup
@ -36,13 +42,16 @@ 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%x64\vmware-vmx-stats.exe" .\backup\x64
xcopy /F /Y "%InstallPath%vmwarebase.dll" .\backup\ xcopy /F /Y "%InstallPath%vmwarebase.dll" .\backup\
echo.
echo Patching... echo Patching...
unlocker.exe unlocker.exe
echo.
echo Getting VMware Tools... echo Getting VMware Tools...
gettools.exe gettools.exe
xcopy /F /Y .\tools\darwin*.* "%InstallPath%" xcopy /F /Y .\tools\darwin*.* "%InstallPath%"
echo.
echo Starting VMware services... echo Starting VMware services...
net start VMUSBArbService > NUL 2>&1 net start VMUSBArbService > NUL 2>&1
net start VMAuthdService > NUL 2>&1 net start VMAuthdService > NUL 2>&1
@ -50,5 +59,5 @@ net start VMwareHostd > NUL 2>&1
net start vmware-view-usbd > NUL 2>&1 net start vmware-view-usbd > NUL 2>&1
popd popd
echo.
echo Finished! echo Finished!

View File

@ -1,22 +1,30 @@
@echo off @echo off
setlocal ENABLEEXTENSIONS setlocal ENABLEEXTENSIONS
echo.
echo Unlocker 3.0.2 for VMware Workstation echo Unlocker 3.0.2 for VMware Workstation
echo ===================================== echo =====================================
echo (c) Dave Parsons 2011-18 echo (c) Dave Parsons 2011-18
echo.
echo Set encoding parameters...
chcp 850
net session >NUL 2>&1 net session >NUL 2>&1
if %errorlevel% neq 0 ( if %errorlevel% neq 0 (
echo Administrator privileges required! echo Administrator privileges required!
exit exit /b
) )
pushd %~dp0 echo.
set KeyName="HKLM\SOFTWARE\Wow6432Node\VMware, Inc.\VMware Player"
set KeyName="HKLM\SOFTWARE\Wow6432Node\VMware, Inc.\VMware Workstation"
:: delims is a TAB followed by a space :: delims is a TAB followed by a space
for /F "tokens=2* delims= " %%A in ('REG QUERY %KeyName% /v InstallPath') do set InstallPath=%%B for /F "tokens=2* delims= " %%A in ('REG QUERY %KeyName% /v InstallPath') do set InstallPath=%%B
echo VMware is installed at: %InstallPath% 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%
pushd %~dp0
echo.
echo Stopping VMware services... echo Stopping VMware services...
net stop vmware-view-usbd > NUL 2>&1 net stop vmware-view-usbd > NUL 2>&1
net stop VMwareHostd > NUL 2>&1 net stop VMwareHostd > NUL 2>&1
@ -24,6 +32,7 @@ net stop VMAuthdService > NUL 2>&1
net stop VMUSBArbService > NUL 2>&1 net stop VMUSBArbService > NUL 2>&1
taskkill /F /IM vmware-tray.exe > NUL 2>&1 taskkill /F /IM vmware-tray.exe > NUL 2>&1
echo.
echo Backing up files... echo Backing up files...
rd /s /q .\backup > NUL 2>&1 rd /s /q .\backup > NUL 2>&1
mkdir .\backup mkdir .\backup
@ -33,13 +42,16 @@ 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%x64\vmware-vmx-stats.exe" .\backup\x64
xcopy /F /Y "%InstallPath%vmwarebase.dll" .\backup\ xcopy /F /Y "%InstallPath%vmwarebase.dll" .\backup\
echo.
echo Patching... echo Patching...
python unlocker.py python unlocker.py
echo.
echo Getting VMware Tools... echo Getting VMware Tools...
python gettools.py python gettools.py
xcopy /F /Y .\tools\darwin*.* "%InstallPath%" xcopy /F /Y .\tools\darwin*.* "%InstallPath%"
echo.
echo Starting VMware services... echo Starting VMware services...
net start VMUSBArbService > NUL 2>&1 net start VMUSBArbService > NUL 2>&1
net start VMAuthdService > NUL 2>&1 net start VMAuthdService > NUL 2>&1
@ -47,5 +59,5 @@ net start VMwareHostd > NUL 2>&1
net start vmware-view-usbd > NUL 2>&1 net start vmware-view-usbd > NUL 2>&1
popd popd
echo.
echo Finished! echo Finished!

View File

@ -1,5 +1,6 @@
@echo off @echo off
setlocal ENABLEEXTENSIONS setlocal ENABLEEXTENSIONS
echo.
echo Unlocker 3.0.2 for VMware Workstation echo Unlocker 3.0.2 for VMware Workstation
echo ===================================== echo =====================================
echo (c) Dave Parsons 2011-18 echo (c) Dave Parsons 2011-18
@ -10,17 +11,17 @@ if %errorlevel% neq 0 (
exit exit
) )
pushd %~dp0 echo.
set KeyName="HKLM\SOFTWARE\Wow6432Node\VMware, Inc.\VMware Player"
if %PROCESSOR_ARCHITECTURE% == AMD64 (
set KeyName="HKLM\SOFTWARE\Wow6432Node\VMware, Inc.\VMware Workstation"
) else (
set KeyName="HKLM\SOFTWARE\VMware, Inc.\VMware Workstation"
)
:: delims is a TAB followed by a space :: delims is a TAB followed by a space
for /F "tokens=2* delims= " %%A in ('REG QUERY %KeyName% /v InstallPath') do set InstallPath=%%B for /F "tokens=2* delims= " %%A in ('REG QUERY %KeyName% /v InstallPath') do set InstallPath=%%B
echo VMware is installed at: %InstallPath% 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%
pushd %~dp0
echo.
echo Stopping VMware services... echo Stopping VMware services...
net stop vmware-view-usbd > NUL 2>&1 net stop vmware-view-usbd > NUL 2>&1
net stop VMwareHostd > NUL 2>&1 net stop VMwareHostd > NUL 2>&1
@ -28,15 +29,18 @@ net stop VMAuthdService > NUL 2>&1
net stop VMUSBArbService > NUL 2>&1 net stop VMUSBArbService > NUL 2>&1
taskkill /F /IM vmware-tray.exe > NUL 2>&1 taskkill /F /IM vmware-tray.exe > NUL 2>&1
echo.
echo Restoring files... echo Restoring files...
xcopy /F /Y .\backup\x64\*.* "%InstallPath%x64\" xcopy /F /Y .\backup\x64\*.* "%InstallPath%x64\"
xcopy /F /Y .\backup\*.* "%InstallPath%" xcopy /F /Y .\backup\*.* "%InstallPath%"
del /f "%InstallPath%"darwin*.* del /f "%InstallPath%"darwin*.*
echo.
echo Removing backup files... echo Removing backup files...
rd /s /q .\backup > NUL 2>&1 rd /s /q .\backup > NUL 2>&1
rd /s /q .\tools > NUL 2>&1 rd /s /q .\tools > NUL 2>&1
echo.
echo Starting VMware services... echo Starting VMware services...
net start VMUSBArbService > NUL 2>&1 net start VMUSBArbService > NUL 2>&1
net start VMAuthdService > NUL 2>&1 net start VMAuthdService > NUL 2>&1
@ -44,5 +48,5 @@ net start VMwareHostd > NUL 2>&1
net start vmware-view-usbd > NUL 2>&1 net start vmware-view-usbd > NUL 2>&1
popd popd
echo.
echo Finished! echo Finished!