VB   发布时间:2022-04-03  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了在winpe中使用sdimgr发布xpe的image大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

今天按照msdn上的文档,制作了windows embedded的可运行image,并打包成sdi文件,

然后用winpe启动虚拟机,试图用sdimgr命令提取sdi中的image;结果是运行sdimgr失败,提示不是可执行程序。

后来发现winpe默认是不支持脚本的,而如果要通过winpe发布image,最好是制作一个支持脚本的customized的winpe。

在google上找到了以下文档,证明是可行的。

http://www.droppedpackets.org/osd/vbscript-in-winpe

终于可以给给人演示一把了。


原文引用如下:

VBScript in WinPE

作者:jbuelens 上次修改时间: 2008-12-22 10:37 贡献人:jack Extending the preboot environment's capabilities Before you start,are you sure you want VBScript? If you have existing VB scripts that you want to use under WinPE,then yes,read on. But if you just wanted to do some scripting and you don't have a vested interest in VB,have a look at AutoIt first. Download Autoit from http://www.autoitscript.com (it is freeware). Autoit is similar to vb script and anybody who feels comfortable editing a vb script is likely to feel equally comfortable editing an Autoit script. But in contrast with vb,an Autoit script can be compiled and run as a small self-contained executable,with no need for run-time DLLs. If you do want VB Scripting support,here is how to include it in your existing WinPE image: 1. On your core server,use WinImage to open the WinPE image file (in a default install,this is C:/Program Files/LANDesk/ManagementSuite/landesk/vboot/ldvpe1.img) 2. Copy these 12 files from a Win2003 SP1 server’s system32 folder to WinPE’s /i386/system32: cscript.exe,jscript.dll,mlang.dll,scrobj.dll,scrrun.dll,stdole2.tlb,vbscript.dll,wscript.exe,wshext.dll,wshom.ocx,odbc32.dll,odbcint.dll 3. Copy this file from a Win2003 SP1 server’s windows/inf folder to WinPE’s /i386/system32: wsh.inf 4. Create /i386/system32/oc.bat with the following content: @ECHO OFF START "Installing Components" /MIN OC2.bat 5. Create /i386/system32/oc2.bat with the following content: REM - INSTALL WSH COMPONENTS regsvr32 %SystemRoot%/System32/jscript.dll /S regsvr32 %SystemRoot%/System32/scrobj.dll /S regsvr32 %SystemRoot%/System32/scrrun.dll /S regsvr32 %SystemRoot%/System32/vbscript.dll /S regsvr32 %SystemRoot%/System32/wshext.dll /S regsvr32 %SystemRoot%/System32/wshom.ocx /S regsvr32 %SystemRoot%/System32/mlang.dll /S REM - INSTALL FILE ASSOCIATIONS FOR WSH %SystemRoot%/System32/rundll32.exe setupapi,InstallHinfSection DefaultInstall 132 WSH.inf EXIT 6. Insert the following line in /i386/system32/startnet.cmd: (where? Not critical – suggest after “factory –winpe”) call oc.bat 7. Save the ldvpe1.img image. 8. Redeploy your PXE representatives. Rather than building a new WinPE image that includes VB Scripting,you might just add scripting support on-the-fly. You use the out-of-the-box WinPE image and you include REMEXEC lines in your OSD script that copy and register the necessary files. Use the same instructions as above (excluding items 1 and 6-7 of the list),but use REMEXEC lines in your OSD script,or equivalent actions in your provisioning template,to copy the files and run the OC.bat file. If there is any danger of running out of space,here are 3 files that you can safely delete from the i386/system32: winpe.bmp,ntoskrnl.exe,ntkrnlmp.exe. These files must be there at boot time (do not delete them from the WinPE image!). But once WinPE is running,it is safe to delete them. There is a cost to adding the files on-the-fly: 2.4 MB to be copied,presumably from the core server. If it is important to avoid that cost,go back to plan A and include the files in the image.

大佬总结

以上是大佬教程为你收集整理的在winpe中使用sdimgr发布xpe的image全部内容,希望文章能够帮你解决在winpe中使用sdimgr发布xpe的image所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。
标签: