加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

在Windows 7中完全自动安装虚拟机工具

发布时间:2020-12-13 23:04:26 所属栏目:Windows 来源:网络整理
导读:我正在无人值守地安装 Windows.其中一部分是安装virtualbox guest添加项,由安装程序运行,因为Autounattend.xml中有以下条目: ?xml version="1.0" encoding="utf-8"?unattend xmlns="urn:schemas-microsoft-com:unattend" ... settings pass="oobeSystem" ..
我正在无人值守地安装 Windows.其中一部分是安装virtualbox guest添加项,由安装程序运行,因为Autounattend.xml中有以下条目:
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
  ...
  <settings pass="oobeSystem">
    ...
    <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="NonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      ...
      <FirstLogonCommands>
        <SynchronousCommand>
          <Order>30</Order>
          <Description>VirtualBox Additions</Description>
          <CommandLine>F:VBoxWindowsAdditions-x86.exe /S</CommandLine>
        </SynchronousCommand>
        ...

它运行正常,没有GUI安装.但是,弹出两个窗口询问是否安装两个设备驱动程序.这对于自动安装来说不是好兆头.有没有办法强制win7接受驱动程序,或者我可以设置一个注册表项以使其信任它们?

避免这些提示的最佳方法是获取设备驱动程序签名所需的证书,并在安装之前将其安装在guest虚拟机上.您可以在本地计算机中找到Sun的证书和Oracle的证书 – > Trusted Publisher证书存储区.您可以轻松地从那里导出它们,然后在安装添加项之前将它们导入到guest虚拟机中.

要从已安装的计算机中提取证书,并使用PowerShell信任用于对设备驱动程序进行签名的证书,请执行以下操作:

cd cert:LocalMachineTrustedPublisher
$cert = dir | where { $_.Subject -like "*Oracle*" }
$type = [System.Security.Cryptography.X509Certificates.X509ContentType]::Cert
$bytes = $cert.Export($type)
[System.IO.File]::WriteAllBytes("C:Oracle.cer",$bytes)

您可能希望运行上述命令并将* Oracle *替换为* Sun Microsystems *并捕获这两个证书,因此它们都可以存在,因此您可以使用VirtualBox更加独立于版本.只需确保在无人参与的guest虚拟机添加之前安装了这些证书.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读