yfwang0798 发表于 2016-3-30 13:09 非常感谢啊 |
前面介绍的网站下载软件包中有帮助文件,最简单的语法 http://reboot.pro/topic/4424-app ... g-a-new-app-script/ 也可以参考别人制作的脚本学习。 |
yfwang0798 发表于 2016-3-29 17:23 能提供学习winbuilder语法的资料么,嘿嘿,^_^ |
国外这个网站有现成的软件,包含notepad等组件。 , http://theoven.org/index.php?PHP ... c490083859460d7efa; 它提供的notepad,没有数字签名,不是微软的,但是可以在pe中运行。只要会winbuilder语法,就可以自己定制pe。 |
slore 发表于 2016-3-29 11:30 嗯嗯,我确认,因为我把程序中某些代码注释掉,程序可以正确执行的。 |
cnpirate 发表于 2016-3-29 11:26 你确定你的/MT设定到release|x64的配置上了么? /MT的话运行库是直接编译到exe程序里面的。 |
yfwang0798 发表于 2016-3-25 20:30 添加文件和导入注册表后,在PE环境下,打开文本文件,提示: The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe tool for more detail. 起初,我以为是注册表导入的不对,但是换一个机器的注册表,还是一样的错误 使用sxstrace.exe获得log文件如下: ================= Begin Activation Context Generation. Input Parameter: Flags = 0 ProcessorArchitecture = AMD64 CultureFallBacks = en-US;en ManifestPath = X:\windows\system32\NOTEPAD.EXE AssemblyDirectory = X:\windows\system32\ Application Config File = ----------------- INFO: Parsing Manifest File X:\windows\system32\NOTEPAD.EXE. INFO: Manifest Definition Identity is Notepad2,type="win32",version="5.1.0.0". INFO: Reference: Microsoft.Windows.Common-Controls,language="*",processorArchitecture="*",publicKeyToken="6595b64144ccf1df",type="win32",version="6.0.0.0" INFO: Resolving reference Microsoft.Windows.Common-Controls,language="*",processorArchitecture="*",publicKeyToken="6595b64144ccf1df",type="win32",version="6.0.0.0". INFO: Resolving reference for ProcessorArchitecture AMD64. INFO: Resolving reference for culture en-US. INFO: Applying Binding Policy. INFO: No publisher policy found. INFO: No binding policy redirect found. INFO: Begin assembly probing. INFO: Did not find the assembly in WinSxS. INFO: Attempt to probe manifest at X:\windows\assembly\GAC_64\Microsoft.Windows.Common-Controls\6.0.0.0_en-US_6595b64144ccf1df\Microsoft.Windows.Common-Controls.DLL. INFO: Attempt to probe manifest at X:\windows\system32\en-US\Microsoft.Windows.Common-Controls.DLL. INFO: Attempt to probe manifest at X:\windows\system32\en-US\Microsoft.Windows.Common-Controls.MANIFEST. INFO: Attempt to probe manifest at X:\windows\system32\en-US\Microsoft.Windows.Common-Controls\Microsoft.Windows.Common-Controls.DLL. INFO: Attempt to probe manifest at X:\windows\system32\en-US\Microsoft.Windows.Common-Controls\Microsoft.Windows.Common-Controls.MANIFEST. INFO: Did not find manifest for culture en-US. INFO: End assembly probing. INFO: Resolving reference for culture en. INFO: Applying Binding Policy. INFO: No publisher policy found. INFO: No binding policy redirect found. INFO: Begin assembly probing. INFO: Did not find the assembly in WinSxS. INFO: Attempt to probe manifest at X:\windows\assembly\GAC_64\Microsoft.Windows.Common-Controls\6.0.0.0_en_6595b64144ccf1df\Microsoft.Windows.Common-Controls.DLL. INFO: Did not find manifest for culture en. INFO: End assembly probing. INFO: Resolving reference for culture Neutral. INFO: Applying Binding Policy. INFO: Auto Servicing Policy redirected assembly version. INFO: Post policy assembly identity is Microsoft.Windows.Common-Controls,processorArchitecture="AMD64",publicKeyToken="6595b64144ccf1df",type="win32",version="6.0.7601.18837". INFO: Begin assembly probing. INFO: Attempt to probe manifest at X:\windows\WinSxS\manifests\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.18837_none_fa3b1e3d17594757.manifest. INFO: Attempt to probe manifest at X:\windows\assembly\GAC_64\Microsoft.Windows.Common-Controls\6.0.7601.18837__6595b64144ccf1df\Microsoft.Windows.Common-Controls.DLL. INFO: Attempt to probe manifest at X:\windows\system32\Microsoft.Windows.Common-Controls.DLL. INFO: Attempt to probe manifest at X:\windows\system32\Microsoft.Windows.Common-Controls.MANIFEST. INFO: Attempt to probe manifest at X:\windows\system32\Microsoft.Windows.Common-Controls\Microsoft.Windows.Common-Controls.DLL. INFO: Attempt to probe manifest at X:\windows\system32\Microsoft.Windows.Common-Controls\Microsoft.Windows.Common-Controls.MANIFEST. INFO: Did not find manifest for culture Neutral. INFO: End assembly probing. INFO: Resolving reference for ProcessorArchitecture MSIL. INFO: Resolving reference for culture en-US. INFO: Applying Binding Policy. INFO: No publisher policy found. INFO: No binding policy redirect found. INFO: Begin assembly probing. INFO: Did not find the assembly in WinSxS. INFO: Attempt to probe manifest at X:\windows\assembly\GAC_MSIL\Microsoft.Windows.Common-Controls\6.0.7601.18837_en-US_6595b64144ccf1df\Microsoft.Windows.Common-Controls.DLL. INFO: Did not find manifest for culture en-US. INFO: End assembly probing. INFO: Resolving reference for culture en. INFO: Applying Binding Policy. INFO: No publisher policy found. INFO: No binding policy redirect found. INFO: Begin assembly probing. INFO: Did not find the assembly in WinSxS. INFO: Attempt to probe manifest at X:\windows\assembly\GAC_MSIL\Microsoft.Windows.Common-Controls\6.0.7601.18837_en_6595b64144ccf1df\Microsoft.Windows.Common-Controls.DLL. INFO: Did not find manifest for culture en. INFO: End assembly probing. INFO: Resolving reference for culture Neutral. INFO: Applying Binding Policy. INFO: No publisher policy found. INFO: No binding policy redirect found. INFO: Begin assembly probing. INFO: Did not find the assembly in WinSxS. INFO: Attempt to probe manifest at X:\windows\assembly\GAC_MSIL\Microsoft.Windows.Common-Controls\6.0.7601.18837__6595b64144ccf1df\Microsoft.Windows.Common-Controls.DLL. INFO: Did not find manifest for culture Neutral. INFO: End assembly probing. INFO: Resolving reference for ProcessorArchitecture Data. INFO: Resolving reference for culture en-US. INFO: Applying Binding Policy. INFO: No publisher policy found. INFO: No binding policy redirect found. INFO: Begin assembly probing. INFO: Did not find the assembly in WinSxS. INFO: Attempt to probe manifest at X:\windows\assembly\GAC\Microsoft.Windows.Common-Controls\6.0.7601.18837_en-US_6595b64144ccf1df\Microsoft.Windows.Common-Controls.DLL. INFO: Did not find manifest for culture en-US. INFO: End assembly probing. INFO: Resolving reference for culture en. INFO: Applying Binding Policy. INFO: No publisher policy found. INFO: No binding policy redirect found. INFO: Begin assembly probing. INFO: Did not find the assembly in WinSxS. INFO: Attempt to probe manifest at X:\windows\assembly\GAC\Microsoft.Windows.Common-Controls\6.0.7601.18837_en_6595b64144ccf1df\Microsoft.Windows.Common-Controls.DLL. INFO: Did not find manifest for culture en. INFO: End assembly probing. INFO: Resolving reference for culture Neutral. INFO: Applying Binding Policy. INFO: No publisher policy found. INFO: No binding policy redirect found. INFO: Begin assembly probing. INFO: Did not find the assembly in WinSxS. INFO: Attempt to probe manifest at X:\windows\assembly\GAC\Microsoft.Windows.Common-Controls\6.0.7601.18837__6595b64144ccf1df\Microsoft.Windows.Common-Controls.DLL. INFO: Did not find manifest for culture Neutral. INFO: End assembly probing. ERROR: Cannot resolve reference Microsoft.Windows.Common-Controls,language="*",processorArchitecture="*",publicKeyToken="6595b64144ccf1df",type="win32",version="6.0.0.0". ERROR: Activation Context generation failed. End Activation Context Generation. ================= Begin Activation Context Generation. Input Parameter: Flags = 0 ProcessorArchitecture = AMD64 CultureFallBacks = en-US;en ManifestPath = X:\windows\system32\ndfapi.dll AssemblyDirectory = X:\windows\system32\ Application Config File = ----------------- INFO: Parsing Manifest File X:\windows\system32\ndfapi.dll. INFO: Manifest Definition Identity is ndfapi,processorArchitecture="amd64",type="win32",version="1.0.0.0". INFO: Reference: Microsoft.Windows.Common-Controls,language="*",processorArchitecture="amd64",publicKeyToken="6595b64144ccf1df",type="win32",version="6.0.0.0" INFO: Resolving reference Microsoft.Windows.Common-Controls,language="*",processorArchitecture="amd64",publicKeyToken="6595b64144ccf1df",type="win32",version="6.0.0.0". INFO: Resolving reference for ProcessorArchitecture amd64. INFO: Resolving reference for culture en-US. INFO: Applying Binding Policy. INFO: No publisher policy found. INFO: No binding policy redirect found. INFO: Begin assembly probing. INFO: Did not find the assembly in WinSxS. INFO: Attempt to probe manifest at X:\windows\assembly\GAC_64\Microsoft.Windows.Common-Controls\6.0.0.0_en-US_6595b64144ccf1df\Microsoft.Windows.Common-Controls.DLL. INFO: Attempt to probe manifest at X:\windows\system32\en-US\Microsoft.Windows.Common-Controls.DLL. INFO: Attempt to probe manifest at X:\windows\system32\en-US\Microsoft.Windows.Common-Controls.MANIFEST. INFO: Attempt to probe manifest at X:\windows\system32\en-US\Microsoft.Windows.Common-Controls\Microsoft.Windows.Common-Controls.DLL. INFO: Attempt to probe manifest at X:\windows\system32\en-US\Microsoft.Windows.Common-Controls\Microsoft.Windows.Common-Controls.MANIFEST. INFO: Did not find manifest for culture en-US. INFO: End assembly probing. INFO: Resolving reference for culture en. INFO: Applying Binding Policy. INFO: No publisher policy found. INFO: No binding policy redirect found. INFO: Begin assembly probing. INFO: Did not find the assembly in WinSxS. INFO: Attempt to probe manifest at X:\windows\assembly\GAC_64\Microsoft.Windows.Common-Controls\6.0.0.0_en_6595b64144ccf1df\Microsoft.Windows.Common-Controls.DLL. INFO: Did not find manifest for culture en. INFO: End assembly probing. INFO: Resolving reference for culture Neutral. INFO: Applying Binding Policy. INFO: Auto Servicing Policy redirected assembly version. INFO: Post policy assembly identity is Microsoft.Windows.Common-Controls,processorArchitecture="amd64",publicKeyToken="6595b64144ccf1df",type="win32",version="6.0.7601.18837". INFO: Begin assembly probing. INFO: Attempt to probe manifest at X:\windows\WinSxS\manifests\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.18837_none_fa3b1e3d17594757.manifest. INFO: Attempt to probe manifest at X:\windows\assembly\GAC_64\Microsoft.Windows.Common-Controls\6.0.7601.18837__6595b64144ccf1df\Microsoft.Windows.Common-Controls.DLL. INFO: Attempt to probe manifest at X:\windows\system32\Microsoft.Windows.Common-Controls.DLL. INFO: Attempt to probe manifest at X:\windows\system32\Microsoft.Windows.Common-Controls.MANIFEST. INFO: Attempt to probe manifest at X:\windows\system32\Microsoft.Windows.Common-Controls\Microsoft.Windows.Common-Controls.DLL. INFO: Attempt to probe manifest at X:\windows\system32\Microsoft.Windows.Common-Controls\Microsoft.Windows.Common-Controls.MANIFEST. INFO: Did not find manifest for culture Neutral. INFO: End assembly probing. ERROR: Cannot resolve reference Microsoft.Windows.Common-Controls,language="*",processorArchitecture="amd64",publicKeyToken="6595b64144ccf1df",type="win32",version="6.0.0.0". ERROR: Activation Context generation failed. End Activation Context Generation. |
yfwang0798 发表于 2016-3-25 20:30 按照你说的方法,我把Windows\winsxs下所有包含amd64和vc字符的文件,以及Windows\winsxs\manifests文件下包含amd64和vc字符的文件导入到PE中,并且将注册表也导入,我的程序可以在PE环境下运行了。 非常感谢,谢谢 |
本帖最后由 yfwang0798 于 2016-3-25 20:34 编辑 以前在pe3 x86集成vc相关文件和注册表设置,用于适用active password changer 6.01,64位应该类似: 要添加的文件位置 Windows\winsxs 下所有包含 x86 和 vc 字符的文件夹,如 x86_microsoft-windows-vcm-core-codecs_31bf3856ad364e35_6.1.7601.17514_none_6eaa2afd36b1e303 等几个文件夹 Windows\winsxs\manifests 文件夹下包含 x86 和vc名字的文件。例如x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.4940_none_d08cc06a442b34fc.manif 等文件。 要添加的注册表位置 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SideBySide\Winners 下所有包含 x86和vc的注册表。 |
本帖最后由 2012tzyx 于 2016-3-25 18:58 编辑 vc2008还需要注册表的吧。要么就还得加几个manifest文件。 试试用dependency walker找找依赖。 |
frg521 发表于 2016-3-24 17:38 压缩/解压,代码都是PECMD内置的,就是LZMA命令的代码,这个代码网上有,以前我在时空论坛发过类似的代码。另一个是自己如何读取资源数据,网上也有代码——PE文件头格式。 |
slore 发表于 2016-3-24 12:44 自己写的那个程序没有使用.net,也没有使用MFC,而且也改成/MT编译了,但是在PE运行时,还是0xC0150002错误。网上说这个错误,表示库文件缺失。因此我想把VC下的库文件都加入到PE中,看看能不能解决这个问题。 |
不使用.net,不使用MFC,纯WIN32程序的话,/MT编译就可以直接PE用。 |
Powered by Discuz! X3.3
© 2001-2017 Comsenz Inc.