在WinPE上运行VMware!

本人尝试多次,在winpe上运行VMware workstation,不管是完整版,精简绿色版都会报错,上网查了N多资料,没有可行的办法,
在这里有For BartPE的vmware Plugin:http://www.bootcd.us/BartPE_Plugin_Details/535/VMware-Workstation-4_5_2-Plugin.html
希望高手去研究一下,既然在BartPE下能运行,在WinPE下我想应该也能的,附上相关资料:
===============================================================================
This is a test to find out if this plugin works without my customizations on XPE1.02 
I don't expect this to work on XP or with any other shell than XPE 1.02.
I think you will need a WMI-repository and MSI ..... let's find out about compatibilty of this plugin and your PE.
Please do not redistribute this at this stage because I expect it to change a lot next weeks.

This plugin needs some more preparation than usual. Here is a description of the necessary steps.

Dependancies:

XPE 1.0.2 - MSI - 2k3-built of BartPE - a standard installation of VMware on a 2k3 system 

Files:

This plugin needs files in several system-folders and about 20MB in a program folder. The programs runs from
Ram-drive and in this case R:/ws452 as installpath is hardcoded into all infs - sorry for that - %temp%/ws452 doesn't work for me. Run search and replace on all files if you need to change that. I don't like B: for RAMdrive as I use to have a virtual floppy on this letter. You can decide wether you want files on CD or in a self-extracting archive - for this plugin I used files on CD. 
In some cases you probably have to rename some files for example the oem (?).infs - this plugin uses oem0-oem2.
You can change the oem-number - run s+r on all files to adjust.
Registry:
Most of the registry entries can be done via an *.inf file. There are some registry-entries that can't be processed by PE-builder - they have to be merged in when BartPE is alive. The plugin uses a cmd to export the registry entries. 
If the SAM - branch does not contain more than just the header you have to change permissions on HKLM/SAM so that it expands upto
HKLM/SAM/SAM/Domains/Account/Users/Names/__vmware_user__ 

RAMdrive:
I use the driveletter R:/ for this build - B:/ is better suited for a virtual floppy drive - so I changed the driveletter. I recommend useing a RAMdrive with 256MB or more. If you try less be prepared to see RAMdrive-crashs quite often.

System-RAM:

Don't expect this plugin to work if you are building a BartPE for systems with less than 512MB of RAM. If you only need 
raw-disk-creation you can build for smaller systems - in this case you may even be able to use programfiles on CD instead of RAM-drive to safe about 20MB of RAM.

Testing in a VM:
You can and should test your builts before writing them to media in VMware. 512MB-VMs are enough as you will not be able to start a VM while running on VMware - it may work in Virtual PC but I don't know for sure. If you can push the play-button and get the No VM in a VM message your built is ready for toasting it.

?/p> Run make.cmd and read ws452-files-only.inf

VMware is launched by running vmware.cmd

===============================================================================
还有这里:http://www.911cd.net/forums//index.php?showtopic=8876
===============================================================================
It finally works !


A month ago I had almost given up - 2 months of running against a wall and I still was not able to introduce the "_vmware_user_" pseudo NT-acount that I needed to actually start a VM. Now I know it was worth the time. 
The trick was simply to export the SAM-hive at the right time and to merge it into BartPE at the right time.
I never seen any other plugin make use of the SAM-hive - the pebuilder is not even able to process this kind of registry stuff - so I needed some time until I started looking into non-obvious directions . Another tricky aspect was the sequence in which the different ingredients have to be loaded at boot-time.
Anyway - now I got a way to build a working version based on a 2k3 build with some kind of explorer shell. It is repeatable on different builds, different methods to load network and different explorer-shells. Here is a short outline of the required actions: make a clean install of VMware into R:/ws452 - use installrite to capture classes. Hand edit the registry entries for the drivers. Create a profile-dir with settings for VMware - all users and default users. Manually copy installer dir into build dir as the pebuilder won't accept the dir name. Setup a config.ini and a preferences.ini that fit this special working conditions. Create a BartPE with a RAM-drive as large as possible. Install classes and drivers via *.inf. At boot-time register some *.ocx files, register the 3 dlls needed, copy profiles to RAM-drive, add System-acount to administrator group and finally merge the _vmware_user_ and the group settings.


Well - the working speed is slow compared with a standard install. But I don't think that this argument counts much in those situations where a VMware-LiveCD would be useful.
Desaster recovery - you can start your VMs when your host-system is unusable. You can extract files from Linux or BSD VMs and so on. 
P2V - you can easily find out if a target-system will run in VMware - just go to the target, boot it from BartPE and run the target-system as a VM. Create raw-disks to convert them into vmdk-files.
Forensic - boot a target-system once and be able to read any filesystem natively just by starting small "translator VMs" 

Not all functions are fully working at this time - the biggest problem - passing the check of the _vmware_user_ - is solved and everything else will be simple.
Don't expect a plugin tomorrow - as this will become the most complicated plugin I have ever seen. Actually I use a mixture of *.infs, editing build dir and merging *.reg-files at runtime. Now it runs on a 2k3 build with XPE. I will try XPsp1 as well but I see no point in adopting it for XPsp2 at this time.
Amazingly it doesn't matter if you put the VMware-dir in the ram-drive or onto the CD. I think the option to put it into program-dir looks more promising so I will follow that road.
Another idea that I will try is to load the complete BartPE with VMware into RAM so that I can change CDs and insert media with prebuilt VMs. 
It is possible to install Virtual PC into the same BartPE build. 
My current build includes VMware 4.5.2, Virtual PC, SSH-client with user-keys (client from ssh.com), an older demo-version of X-win 32, various remote control clients like ultravnc, Citrix-clients and some disk-image mounting tools like file-disk, Ken Katos vdk.exe and some P2V scripts. I hope to replace Virtual PC by Virtual Server and to add Svista-serenity as well. I don't have access to these versions now so that may take some time but I am sure that it is possible.


PE为了精简及更加有效的运行目的功能,会对很多东西进行精简
你看下VM绿色版本的绿化程序就知道了。。。。

--很显然为了运行VM,需要让PE进行很多倒退

@shift 1
@echo off
CLS
color 0a
echo.
echo               VMware Workstation 6.0.2.59824 绿色精简版
echo.
echo.
echo                                 即将进行安装,是否要继续......
echo.     
echo ---------------------------------------------------------------------------
echo.


"%cd%/choice.exe" /C YN /N /M "请输入 Y (继续安装)或 N (退出安装):"

IF ERRORLEVEL 1 IF NOT ERRORLEVEL 2 GOTO st
IF ERRORLEVEL 2 IF NOT ERRORLEVEL 3 GOTO ex
PAUSE


:ST

:regdll
echo 正在注册所需的DLL文件....
regsvr32 /s "%cd%/vmappcfg.dll"
regsvr32 /s "%cd%/vmappsdk.dll"
regsvr32 /s "%cd%/vmdbCOM.dll"
regsvr32 /s "%cd%/vmhwcfg.dll"

:addreg
echo 正在添加注册表项目...
reg delete  "HKEY_LOCAL_MACHINE/SOFTWARE/VMware, Inc." /f
set regadd=reg add "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/Setup
%regadd%" /v "SourcePath" /d "%systemroot%/inf" /f
set regadd=reg add "HKEY_LOCAL_MACHINE/SOFTWARE/VMware, Inc.
%regadd%" /v Core /d "VMware Workstation" /f
set regadd=%regadd%/VMware Workstation
%regadd%" /v "InstallPath" /d "%cd%" /f
set regadd=%regadd%/License.ws.6.0.200907
%regadd%" /v "StartFields" /d "Cpt, ProductID, LicenseVersion, LicenseType, Epoch" /f
%regadd%" /v "Cpt" /d "COPYRIGHT (c) VMware, Inc. 1999-2007" /f
%regadd%" /v "ProductID" /d "VMware Workstation for Win32" /f
%regadd%" /v "LicenseVersion" /d "6.0" /f
%regadd%" /v "LicenseType" /d "User" /f
%regadd%" /v "Epoch" /d "2009-7-1" /f
%regadd%" /v "Hash" /d "6b3d34d9-b34f898e-2600b82e-9f65a272-44f2afe8" /f
%regadd%" /v "Serial" /d "ERHUD-2RGAC-X01FZ-4MRN2" /f
%regadd%" /v "Name" /d "User" /f
%regadd%" /v "CompanyName" /d "@China" /f
@reg  add "HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/Cdrom" /v "Autorun" /d "0" /f

:adduser
echo 开始创建 __vmware_user__ 账户 ...
net user __vmware_user__ /add /comment:"VMware User" /fullname:"__vmware_user__"
net localgroup __vmware__ /add /comment:"VMware User Group"  >nul
net localgroup users __vmware_user__ /del >nul
net localgroup __vmware__ __vmware_user__ /add >nul

:Start VM basic service
echo 装载虚拟机需要基本服务 ...
sc create vmx86 type= kernel start= auto binpath= "%cd%/drivers/vmx86.sys" displayname= "VMware Virtualization Driver"
net start vmx86
sc create VMnetuserif type= kernel start= auto binpath= "%cd%/drivers/vmnetuserif.sys" displayname= "VMware Network Application Interface"
net start VMnetuserif
echo 初始化完成,即将启动服务安装....
choice /t 5 /c e /n /d e
CALL "!)服务.cmd"
@ECHO OFF
CLS
color 0a

GOTO MENU
:MENU
ECHO.
ECHO.                  =-=-=-=-=请选择要启动的服务项目=-=-=-=-=
ECHO.
ECHO.                       1  启动-本机网络服务(桥接,直接连接外网)
ECHO.
ECHO.                       2  启动-USB和COM服务
ECHO.
ECHO.                       3  启动-DHCP和NAT服务(共享上网,默认安装虚拟网卡8)
ECHO.
ECHO.                       4  启动-用户权限服务
ECHO.
ECHO.                       5  安装-本地网络
ECHO.
ECHO.                       6  安装-虚拟磁盘映射
ECHO.
ECHO.                       7     退   出
ECHO.
ECHO.
ECHO.
"%cd%/choice.exe" /C 123456789 /N /M 请输入选择项目的序号:
IF ERRORLEVEL 1 IF NOT ERRORLEVEL 2 GOTO SERVICE1
IF ERRORLEVEL 2 IF NOT ERRORLEVEL 3 GOTO SERVICE2
IF ERRORLEVEL 3 IF NOT ERRORLEVEL 4 GOTO SERVICE3
IF ERRORLEVEL 4 IF NOT ERRORLEVEL 5 GOTO SERVICE4
IF ERRORLEVEL 5 IF NOT ERRORLEVEL 6 GOTO SERVICE5
IF ERRORLEVEL 6 IF NOT ERRORLEVEL 7 GOTO SERVICE6
IF ERRORLEVEL 7 GOTO END
PAUSE

:SERVICE1
"%cd%/netcfg.exe" -l "%cd%/drivers/netbridge.inf" -c s -i vmware_bridge
net start VMNETBRIDGE
GOTO MENU

:SERVICE2
sc create hcmon type= kernel start= auto binpath= "%cd%/drivers/hcmon.sys" displayname= "VMware hcmon"
net start hcmon
SC CREATE Vmparport TYPE= KERNEL BINPATH= "%cd%/drivers/VMPARPORT.SYS" GROUP= "EXTENDED BASE" DISPLAYNAME= "VMware VMparport"
net start Vmparport
GOTO MENU

:SERVICE3
sc create "VMware NAT Service" start= auto  binpath= "%cd%/vmnat.exe"  depend= "VMnetuserif" displayname= "VMware NAT Service"
set regadd=reg add "HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/VMware NAT Service/Parameters
%regadd%" /v "ConfigPath" /d "%cd%" /f
sc create VMnetDHCP start= auto  binpath= "%cd%/VMnetDHCP.exe"  depend= "VMnetuserif" displayname= "VMware DHCP Service"
set regadd=reg add "HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/VMnetDHCP/Parameters
%regadd%" /v "ConfFile" /d "%cd%/vmnetdhcp.conf" /f
%regadd%" /v "LeaseFile" /d "%cd%/vmnetdhcp.leases" /f
"%cd%/devcon.exe" -R INSTALL "%cd%/drivers/netadapter.inf" *VMnetAdapter8
start /wait vnetlib -- add dhcp vmnet8
start /wait vnetlib -- add nat vmnet8
start /wait vnetlib -- stop nat
start /wait vnetlib -- set vnet vmnet8 addr 192.168.203.0
start /wait vnetlib -- stop dhcp
start /wait vnetlib -- update dhcp vmnet8
start /wait vnetlib -- start dhcp
start /wait vnetlib -- update nat vmnet8
start /wait vnetlib -- start nat
start /wait vnetlib -- update adapter vmnet8
GOTO MENU

:SERVICE4
sc create VMAuthdService  start= auto binpath= "%cd%/vmware-authd.exe"  depend= "vmx86" displayname= "VMware Authorization Service"
net start VMAuthdService
GOTO MENU

:SERVICE5
sc create VMnetDHCP start= auto  binpath= "%cd%/VMnetDHCP.exe"  depend= "VMnetuserif" displayname= "VMware DHCP Service"
set regadd=reg add "HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/VMnetDHCP/Parameters
%regadd%" /v "ConfFile" /d "%cd%/vmnetdhcp.conf" /f
%regadd%" /v "LeaseFile" /d "%cd%/vmnetdhcp.leases" /f
"%cd%/devcon.exe" -R INSTALL "%cd%/drivers/netadapter.inf" *VMnetAdapter1
start /wait vnetlib -- add dhcp vmnet1
start /wait vnetlib -- set vnet vmnet1 addr 10.10.10.0
start /wait vnetlib -- stop dhcp
start /wait vnetlib -- update dhcp vmnet1
start /wait vnetlib -- start dhcp
start /wait vnetlib -- update adapter vmnet1
GOTO MENU

:SERVICE6
sc create vstor2 type= kernel start= auto binpath= "%cd%/VMMount/vstor2.sys" displayname= "Vstor2 Virtual Storage Driver"
net start vstor2
sc create vstor2-ws60 type= kernel start= demand binpath= "%cd%/VMMount/vstor2-ws60.sys" displayname= "Vstor2 WS60 Virtual Storage Driver"
net start vstor2-ws60
sc create vmount2 start= demand  binpath= "%cd%/VMMount/vmount2.exe"  depend= "RpcSs"  displayname= "VMware Virtual Mount Service Extended"
"%cd%/VMMount/vmount2.exe" /service
net start vmount2
GOTO MENU
:END

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
WinPE下安装USB3.0驱动并运行的步骤如下: 1. 首先,我们需要准备一个WinPE启动盘,并确保其能够正常运行。可以使用Windows PE工具或第三方软件创建一个WinPE启动盘。 2. 下载并解压缩USB3.0驱动安装文件.zip。在压缩包中应包含USB3.0驱动的安装程序或驱动文件。 3. 将USB3.0驱动文件复制到WinPE启动盘的某个目录下。通常,可以将驱动复制到WinPE启动盘的“Windows\System32\Drivers”目录下。 4. 在WinPE启动盘的主目录下,找到并编辑“Startnet.cmd”脚本文件。可以使用记事本或其他文本编辑器打开该文件。 5. 在“Startnet.cmd”脚本文件的末尾添加一行命令,以加载USB3.0驱动。例如,可以使用“drvload.exe”命令加载驱动文件。命令示例:drvload.exe X:\Windows\System32\Drivers\usb3drv.inf 6. 保存并关闭“Startnet.cmd”脚本文件。 7. 使用WinPE启动盘启动计算机。确保计算机从WinPE启动盘启动。 8. 当计算机进入WinPE环境后,它将自动加载并安装添加到“Startnet.cmd”脚本文件中的USB3.0驱动。 9. 确保安装过程完成后,重新启动计算机。 10. 当计算机重新启动进入正常的Windows操作系统时,USB3.0驱动将已成功安装并可供使用。 以上是安装USB3.0驱动并在WinPE运行的基本步骤。根据具体的情况,可能会有一些细微的差异。因此,在操作过程中要仔细阅读相关文档,并遵循制造商提供的指南和说明。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值