gpt4 book ai didi

c# - Windows PE WinForm应用程序未执行

转载 作者:太空宇宙 更新时间:2023-11-03 14:52:25 26 4
gpt4 key购买 nike

我正在制作集成MS .NET Framework的Windows PE OS的Windows映像(.wim),以便运行作为计算机安装向导的WinForm应用程序。

我与this post完全相同,在从命令行执行应用程序时,它没有显示任何界面,也不显示任何错误消息。我还检查了运行过程,没有适合我的应用程序。

关于图像创建,如MS site所示,我首先导入WinPE-WMI要求,然后导入.NET Framework包WinPE-NetFX。接下来,我使用内置映像创建了可启动USB记忆棒。最后,将应用程序复制到USB上存储的其他目录中。

然后,我只是从命令行执行应用程序。

你们有什么主意吗?

在此先感谢您和最诚挚的问候。

杰里米

最佳答案

尝试添加HTA和脚本包,它确实会增加boot.wim的大小,但是某些库需要依赖项。还要检查是否还添加了相应的语言包。我最初在WinPE中执行.Net应用程序时使用的一种策略是添加所有程序包,然后在Virtual Box中对其进行测试,然后慢慢删除那些我不需要查看其是否有效的程序包。我制作了一个批处理脚本以添加所有程序包,并删除不需要的程序包。这是需要的脚本

Dism / Mount-Image /ImageFile:"Z:\Tools\winpe_x86\media\sources\boot.wim“ / index:1 / MountDir:” Z:\ Tools \ winpe_x86 \ mount“

Dism / Add-Package / Image:“ Z:\ Tools \ winpe_x86 \ mount” / PackagePath:“ C:\ Program Files(x86)\ Windows Kits \ 10 \ Asssmentment and Deployment Kit \ Windows预安装环境\ x86 \ WinPE_OCs \ WinPE -HTA.cab“
Dism / Add-Package / Image:“ Z:\ Tools \ winpe_x86 \ mount” / PackagePath:“ C:\ Program Files(x86)\ Windows Kits \ 10 \ Asssmentment and Deployment Kit \ Windows预安装环境\ x86 \ WinPE_OCs \ en -us \ WinPE-HTA_zh-cn.cab“

Dism / Add-Package / Image:“ Z:\ Tools \ winpe_x86 \ mount” / PackagePath:“ C:\ Program Files(x86)\ Windows Kits \ 10 \ Asssmentment and Deployment Kit \ Windows预安装环境\ x86 \ WinPE_OCs \ WinPE -WMI.cab”
Dism / Add-Package / Image:“ Z:\ Tools \ winpe_x86 \ mount” / PackagePath:“ C:\ Program Files(x86)\ Windows Kits \ 10 \ Asssmentment and Deployment Kit \ Windows预安装环境\ x86 \ WinPE_OCs \ en -us \ WinPE-WMI_zh-cn.cab“

Dism / Add-Package / Image:“ Z:\ Tools \ winpe_x86 \ mount” / PackagePath:“ C:\ Program Files(x86)\ Windows Kits \ 10 \ Asssmentment and Deployment Kit \ Windows预安装环境\ x86 \ WinPE_OCs \ WinPE -MDAC.cab“
Dism / Add-Package / Image:“ Z:\ Tools \ winpe_x86 \ mount” / PackagePath:“ C:\ Program Files(x86)\ Windows Kits \ 10 \ Asssmentment and Deployment Kit \ Windows预安装环境\ x86 \ WinPE_OCs \ en -us \ WinPE-MDAC_zh-cn.cab“

Dism / Add-Package / Image:“ Z:\ Tools \ winpe_x86 \ mount” / PackagePath:“ C:\ Program Files(x86)\ Windows Kits \ 10 \ Asssmentment and Deployment Kit \ Windows预安装环境\ x86 \ WinPE_OCs \ WinPE -GamingPeripherals.cab“

Dism / Add-Package / Image:“ Z:\ Tools \ winpe_x86 \ mount” / PackagePath:“ C:\ Program Files(x86)\ Windows Kits \ 10 \ Asssmentment and Deployment Kit \ Windows预安装环境\ x86 \ WinPE_OCs \ WinPE -Dot3Svc.cab“
Dism / Add-Package / Image:“ Z:\ Tools \ winpe_x86 \ mount” / PackagePath:“ C:\ Program Files(x86)\ Windows Kits \ 10 \ Asssmentment and Deployment Kit \ Windows预安装环境\ x86 \ WinPE_OCs \ en -us \ WinPE-Dot3Svc_zh-cn.cab“

Dism / Add-Package / Image:“ Z:\ Tools \ winpe_x86 \ mount” / PackagePath:“ C:\ Program Files(x86)\ Windows Kits \ 10 \ Asssmentment and Deployment Kit \ Windows预安装环境\ x86 \ WinPE_OCs \ WinPE -PPPoE.cab“
Dism / Add-Package / Image:“ Z:\ Tools \ winpe_x86 \ mount” / PackagePath:“ C:\ Program Files(x86)\ Windows Kits \ 10 \ Asssmentment and Deployment Kit \ Windows预安装环境\ x86 \ WinPE_OCs \ en -us \ WinPE-PPPoE_zh-cn.cab“

Dism / Add-Package / Image:“ Z:\ Tools \ winpe_x86 \ mount” / PackagePath:“ C:\ Program Files(x86)\ Windows Kits \ 10 \ Asssmentment and Deployment Kit \ Windows预安装环境\ x86 \ WinPE_OCs \ WinPE -RNDIS.cab“
Dism / Add-Package / Image:“ Z:\ Tools \ winpe_x86 \ mount” / PackagePath:“ C:\ Program Files(x86)\ Windows Kits \ 10 \ Asssmentment and Deployment Kit \ Windows预安装环境\ x86 \ WinPE_OCs \ en -us \ WinPE-RNDIS_zh-cn.cab“

Dism / Add-Package / Image:“ Z:\ Tools \ winpe_x86 \ mount” / PackagePath:“ C:\ Program Files(x86)\ Windows Kits \ 10 \ Asssmentment and Deployment Kit \ Windows预安装环境\ x86 \ WinPE_OCs \ WinPE -WDS-Tools.cab“
Dism / Add-Package / Image:“ Z:\ Tools \ winpe_x86 \ mount” / PackagePath:“ C:\ Program Files(x86)\ Windows Kits \ 10 \ Asssmentment and Deployment Kit \ Windows预安装环境\ x86 \ WinPE_OCs \ en -us \ WinPE-WDS-Tools_zh-cn.cab“

Dism / Add-Package / Image:“ Z:\ Tools \ winpe_x86 \ mount” / PackagePath:“ C:\ Program Files(x86)\ Windows Kits \ 10 \ Asssmentment and Deployment Kit \ Windows预安装环境\ x86 \ WinPE_OCs \ WinPE -Scripting.cab”
Dism / Add-Package / Image:“ Z:\ Tools \ winpe_x86 \ mount” / PackagePath:“ C:\ Program Files(x86)\ Windows Kits \ 10 \ Asssmentment and Deployment Kit \ Windows预安装环境\ x86 \ WinPE_OCs \ en -us \ WinPE-Scripting_zh-cn.cab“

Dism / Add-Package / Image:“ Z:\ Tools \ winpe_x86 \ mount” / PackagePath:“ C:\ Program Files(x86)\ Windows Kits \ 10 \ Asssmentment and Deployment Kit \ Windows预安装环境\ x86 \ WinPE_OCs \ WinPE -NetFx.cab”
Dism / Add-Package / Image:“ Z:\ Tools \ winpe_x86 \ mount” / PackagePath:“ C:\ Program Files(x86)\ Windows Kits \ 10 \ Asssmentment and Deployment Kit \ Windows预安装环境\ x86 \ WinPE_OCs \ en -us \ WinPE-NetFx_en-us.cab“

Dism / Add-Package / Image:“ Z:\ Tools \ winpe_x86 \ mount” / PackagePath:“ C:\ Program Files(x86)\ Windows Kits \ 10 \ Asssmentment and Deployment Kit \ Windows预安装环境\ x86 \ WinPE_OCs \ WinPE -PowerShell.cab”
Dism / Add-Package / Image:“ Z:\ Tools \ winpe_x86 \ mount” / PackagePath:“ C:\ Program Files(x86)\ Windows Kits \ 10 \ Asssmentment and Deployment Kit \ Windows预安装环境\ x86 \ WinPE_OCs \ en -us \ WinPE-PowerShell_zh-cn.cab“

Dism / Add-Package / Image:“ Z:\ Tools \ winpe_x86 \ mount” / PackagePath:“ C:\ Program Files(x86)\ Windows Kits \ 10 \ Asssmentment and Deployment Kit \ Windows预安装环境\ x86 \ WinPE_OCs \ WinPE -DismCmdlets.cab“
Dism / Add-Package / Image:“ Z:\ Tools \ winpe_x86 \ mount” / PackagePath:“ C:\ Program Files(x86)\ Windows Kits \ 10 \ Asssmentment and Deployment Kit \ Windows预安装环境\ x86 \ WinPE_OCs \ en -us \ WinPE-DismCmdlets_zh-cn.cab“

Dism / Add-Package / Image:“ Z:\ Tools \ winpe_x86 \ mount” / PackagePath:“ C:\ Program Files(x86)\ Windows Kits \ 10 \ Asssmentment and Deployment Kit \ Windows预安装环境\ x86 \ WinPE_OCs \ WinPE -SecureBootCmdlets.cab”

Dism / Add-Package / Image:“ Z:\ Tools \ winpe_x86 \ mount” / PackagePath:“ C:\ Program Files(x86)\ Windows Kits \ 10 \ Asssmentment and Deployment Kit \ Windows预安装环境\ x86 \ WinPE_OCs \ WinPE -StorageWMI.cab”
Dism / Add-Package / Image:“ Z:\ Tools \ winpe_x86 \ mount” / PackagePath:“ C:\ Program Files(x86)\ Windows Kits \ 10 \ Asssmentment and Deployment Kit \ Windows预安装环境\ x86 \ WinPE_OCs \ en -us \ WinPE-StorageWMI_zh-cn.cab“
Dism / Unmount-Image / MountDir:“ Z:\ Tools \ winpe_x86 \ mount” / commit

要在虚拟盒中进行测试,请使用VMI作为驱动器,Windows 7和更高版本可以使用Diskpart或Disk Management挂载VMI文件。

关于c# - Windows PE WinForm应用程序未执行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51175816/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com