windows xp 下无法运行 VS2013 创建的安装文件

Posted

技术标签:

【中文标题】windows xp 下无法运行 VS2013 创建的安装文件【英文标题】:Cannot run the Setup file which created by VS2013 in windows xp 【发布时间】:2015-04-13 10:22:07 【问题描述】:

在 VS-2013、Dotnet4 框架和 32 位架构中创建了一个用 c# 开发的安装文件。它正在安装在 Windows 7 和 Windows 8 中,但没有安装在具有管理员权限的 Windows XP (SP3) 中。 错误:“安装程序在安装应用程序之前被中断。您需要重新启动安装程序才能重试。”在这方面需要帮助。

Output of msiexec /i Setup.msi /l*v MyLogFile.txt

=== Verbose logging started: 2/12/2015  20:19:11  Build type: SHIP UNICODE 3.01.4001.5512  Calling process: C:\WINDOWS\system32\msiexec.exe ===
MSI (c) (D4:B4) [20:19:11:125]: Resetting cached policy values
MSI (c) (D4:B4) [20:19:11:125]: Machine policy value 'Debug' is 0
MSI (c) (D4:B4) [20:19:11:125]: ******* RunEngine:
           ******* Product: Setup.msi
           ******* Action: 
           ******* CommandLine: **********
MSI (c) (D4:B4) [20:19:11:125]: Machine policy value 'DisableUserInstalls' is 0
MSI (c) (D4:B4) [20:19:11:234]: SOFTWARE RESTRICTION POLICY: Verifying package --> 'D:\Setup.msi' against software restriction policy
MSI (c) (D4:B4) [20:19:11:234]: Note: 1: 2262 2: DigitalSignature 3: -2147287038 
MSI (c) (D4:B4) [20:19:11:234]: SOFTWARE RESTRICTION POLICY: D:\Setup.msi is not digitally signed
MSI (c) (D4:B4) [20:19:11:234]: SOFTWARE RESTRICTION POLICY: D:\Setup.msi is permitted to run at the 'unrestricted' authorization level.
MSI (c) (D4:B4) [20:19:11:562]: Cloaking enabled.
MSI (c) (D4:B4) [20:19:11:562]: Attempting to enable all disabled priveleges before calling Install on Server
MSI (c) (D4:B4) [20:19:11:593]: End dialog not enabled
MSI (c) (D4:B4) [20:19:11:593]: Original package ==> D:\Setup.msi
MSI (c) (D4:B4) [20:19:11:593]: Package we're running from ==> C:\DOCUME~1\admin\LOCALS~1\Temp\486c8b74.msi
MSI (c) (D4:B4) [20:19:11:593]: APPCOMPAT: looking for appcompat database entry with ProductCode 'DC3A4FA7-B437-455E-ABE4-13FA61195AF2'.
MSI (c) (D4:B4) [20:19:11:593]: APPCOMPAT: no matching ProductCode found in database.
MSI (c) (D4:B4) [20:19:11:609]: MSCOREE not loaded loading copy from system32
MSI (c) (D4:B4) [20:19:11:640]: Machine policy value 'TransformsSecure' is 0
MSI (c) (D4:B4) [20:19:11:640]: User policy value 'TransformsAtSource' is 0
MSI (c) (D4:B4) [20:19:11:640]: Note: 1: 2262 2: MsiFileHash 3: -2147287038 
MSI (c) (D4:B4) [20:19:11:640]: Machine policy value 'DisablePatch' is 0
MSI (c) (D4:B4) [20:19:11:640]: Machine policy value 'AllowLockdownPatch' is 0
MSI (c) (D4:B4) [20:19:11:640]: Machine policy value 'DisableLUAPatching' is 0
MSI (c) (D4:B4) [20:19:11:640]: Machine policy value 'DisableFlyWeightPatching' is 0
MSI (c) (D4:B4) [20:19:11:640]: APPCOMPAT: looking for appcompat database entry with ProductCode 'DC3A4FA7-B437-455E-ABE4-13FA61195AF2'.
MSI (c) (D4:B4) [20:19:11:640]: APPCOMPAT: no matching ProductCode found in database.
MSI (c) (D4:B4) [20:19:11:640]: Transforms are not secure.
MSI (c) (D4:B4) [20:19:11:640]: Command Line: CURRENTDIRECTORY=D:\ CLIENTUILEVEL=0 CLIENTPROCESSID=3796 
MSI (c) (D4:B4) [20:19:11:640]: PROPERTY CHANGE: Adding PackageCode property. Its value is '80AB49AE-1D7B-4E2B-83B4-ED5310D6B599'.
MSI (c) (D4:B4) [20:19:11:640]: Product Code passed to Engine.Initialize:           ''
MSI (c) (D4:B4) [20:19:11:640]: Product Code from property table before transforms: 'DC3A4FA7-B437-455E-ABE4-13FA61195AF2'
MSI (c) (D4:B4) [20:19:11:640]: Product Code from property table after transforms:  'DC3A4FA7-B437-455E-ABE4-13FA61195AF2'
MSI (c) (D4:B4) [20:19:11:640]: Product not registered: beginning first-time install
MSI (c) (D4:B4) [20:19:11:640]: PROPERTY CHANGE: Adding ProductState property. Its value is '-1'.
MSI (c) (D4:B4) [20:19:11:640]: Entering CMsiConfigurationManager::SetLastUsedSource.
MSI (c) (D4:B4) [20:19:11:640]: User policy value 'SearchOrder' is 'nmu'
MSI (c) (D4:B4) [20:19:11:640]: Adding new sources is allowed.
MSI (c) (D4:B4) [20:19:11:640]: PROPERTY CHANGE: Adding PackagecodeChanging property. Its value is '1'.
MSI (c) (D4:B4) [20:19:11:640]: Package name extracted from package path: 'Setup.msi'
MSI (c) (D4:B4) [20:19:11:640]: Package to be registered: 'Setup.msi'
MSI (c) (D4:B4) [20:19:11:640]: Note: 1: 2262 2: Error 3: -2147287038 
MSI (c) (D4:B4) [20:19:11:640]: Note: 1: 2729 
MSI (c) (D4:B4) [20:19:11:640]: Note: 1: 2729 
MSI (c) (D4:B4) [20:19:11:640]: Note: 1: 2729 
MSI (c) (D4:B4) [20:19:11:656]: Note: 1: 2729 
MSI (c) (D4:B4) [20:19:11:656]: Note: 1: 2729 
MSI (c) (D4:B4) [20:19:11:656]: Note: 1: 2729 
MSI (c) (D4:B4) [20:19:11:656]: Note: 1: 2729 
MSI (c) (D4:B4) [20:19:11:656]: Note: 1: 2729 
MSI (c) (D4:B4) [20:19:11:656]: Note: 1: 2729 
MSI (c) (D4:B4) [20:19:11:671]: Note: 1: 2729 
MSI (c) (D4:B4) [20:19:11:671]: Note: 1: 2729 
MSI (c) (D4:B4) [20:19:11:671]: Note: 1: 2729 
MSI (c) (D4:B4) [20:19:11:671]: Note: 1: 2729 
MSI (c) (D4:B4) [20:19:11:671]: Note: 1: 2729 
MSI (c) (D4:B4) [20:19:11:671]: Note: 1: 2729 
MSI (c) (D4:B4) [20:19:11:687]: Note: 1: 2729 
MSI (c) (D4:B4) [20:19:11:687]: Note: 1: 2262 2: AdminProperties 3: -2147287038 
MSI (c) (D4:B4) [20:19:11:687]: Machine policy value 'DisableMsi' is 0
MSI (c) (D4:B4) [20:19:11:687]: Machine policy value 'AlwaysInstallElevated' is 0
MSI (c) (D4:B4) [20:19:11:687]: User policy value 'AlwaysInstallElevated' is 0
MSI (c) (D4:B4) [20:19:11:687]: Running product 'DC3A4FA7-B437-455E-ABE4-13FA61195AF2' with user privileges: It's not assigned.
MSI (c) (D4:B4) [20:19:11:687]: PROPERTY CHANGE: Adding CURRENTDIRECTORY property. Its value is 'D:\'.
MSI (c) (D4:B4) [20:19:11:687]: PROPERTY CHANGE: Adding CLIENTUILEVEL property. Its value is '0'.
MSI (c) (D4:B4) [20:19:11:687]: PROPERTY CHANGE: Adding CLIENTPROCESSID property. Its value is '3796'.
MSI (c) (D4:B4) [20:19:11:687]: TRANSFORMS property is now: 
MSI (c) (D4:B4) [20:19:11:687]: PROPERTY CHANGE: Adding VersionDatabase property. Its value is '200'.
MSI (c) (D4:B4) [20:19:11:687]: SHELL32::SHGetFolderPath returned: C:\Documents and Settings\admin\Application Data
MSI (c) (D4:B4) [20:19:11:687]: SHELL32::SHGetFolderPath returned: C:\Documents and Settings\admin\Favorites
MSI (c) (D4:B4) [20:19:11:687]: SHELL32::SHGetFolderPath returned: C:\Documents and Settings\admin\NetHood
MSI (c) (D4:B4) [20:19:11:687]: SHELL32::SHGetFolderPath returned: C:\Documents and Settings\admin\My Documents
MSI (c) (D4:B4) [20:19:11:687]: SHELL32::SHGetFolderPath returned: C:\Documents and Settings\admin\PrintHood
MSI (c) (D4:B4) [20:19:11:687]: SHELL32::SHGetFolderPath returned: C:\Documents and Settings\admin\Recent
MSI (c) (D4:B4) [20:19:11:687]: SHELL32::SHGetFolderPath returned: C:\Documents and Settings\admin\SendTo
MSI (c) (D4:B4) [20:19:11:687]: SHELL32::SHGetFolderPath returned: C:\Documents and Settings\admin\Templates
MSI (c) (D4:B4) [20:19:11:687]: SHELL32::SHGetFolderPath returned: C:\Documents and Settings\All Users\Application Data
MSI (c) (D4:B4) [20:19:11:687]: SHELL32::SHGetFolderPath returned: C:\Documents and Settings\admin\Local Settings\Application Data
MSI (c) (D4:B4) [20:19:11:687]: SHELL32::SHGetFolderPath returned: C:\Documents and Settings\admin\My Documents\My Pictures
MSI (c) (D4:B4) [20:19:11:687]: SHELL32::SHGetFolderPath returned: C:\Documents and Settings\admin\Start Menu\Programs\Administrative Tools
MSI (c) (D4:B4) [20:19:11:687]: SHELL32::SHGetFolderPath returned: C:\Documents and Settings\admin\Start Menu\Programs\Startup
MSI (c) (D4:B4) [20:19:11:687]: SHELL32::SHGetFolderPath returned: C:\Documents and Settings\admin\Start Menu\Programs
MSI (c) (D4:B4) [20:19:11:687]: SHELL32::SHGetFolderPath returned: C:\Documents and Settings\admin\Start Menu
MSI (c) (D4:B4) [20:19:11:687]: SHELL32::SHGetFolderPath returned: C:\Documents and Settings\admin\Desktop
MSI (c) (D4:B4) [20:19:11:687]: SHELL32::SHGetFolderPath returned: C:\Documents and Settings\All Users\Start Menu\Programs\Administrative Tools
MSI (c) (D4:B4) [20:19:11:687]: SHELL32::SHGetFolderPath returned: C:\Documents and Settings\All Users\Start Menu\Programs\Startup
MSI (c) (D4:B4) [20:19:11:687]: SHELL32::SHGetFolderPath returned: C:\Documents and Settings\All Users\Start Menu\Programs
MSI (c) (D4:B4) [20:19:11:687]: SHELL32::SHGetFolderPath returned: C:\Documents and Settings\All Users\Start Menu
MSI (c) (D4:B4) [20:19:11:687]: SHELL32::SHGetFolderPath returned: C:\Documents and Settings\All Users\Desktop
MSI (c) (D4:B4) [20:19:11:687]: SHELL32::SHGetFolderPath returned: C:\WINDOWS\Fonts
MSI (c) (D4:B4) [20:19:11:687]: Note: 1: 2898 2: MS Sans Serif 3: MS Sans Serif 4: 0 5: 16 
MSI (c) (D4:B4) [20:19:11:718]: PROPERTY CHANGE: Adding Privileged property. Its value is '1'.
MSI (c) (D4:B4) [20:19:11:718]: Note: 1: 1402 2: HKEY_CURRENT_USER\Software\Microsoft\MS Setup (ACME)\User Info 3: 2 
MSI (c) (D4:B4) [20:19:11:718]: PROPERTY CHANGE: Adding USERNAME property. Its value is 'MACET'.
MSI (c) (D4:B4) [20:19:11:718]: Note: 1: 1402 2: HKEY_CURRENT_USER\Software\Microsoft\MS Setup (ACME)\User Info 3: 2 
MSI (c) (D4:B4) [20:19:11:718]: PROPERTY CHANGE: Adding COMPANYNAME property. Its value is 'Marthandam College of Engineering and Technology'.
MSI (c) (D4:B4) [20:19:11:718]: PROPERTY CHANGE: Adding DATABASE property. Its value is 'C:\DOCUME~1\admin\LOCALS~1\Temp\486c8b74.msi'.
MSI (c) (D4:B4) [20:19:11:718]: PROPERTY CHANGE: Adding OriginalDatabase property. Its value is 'D:\Setup.msi'.
MSI (c) (D4:B4) [20:19:11:718]: PROPERTY CHANGE: Adding SourceDir property. Its value is 'D:\'.
MSI (c) (D4:B4) [20:19:11:718]: PROPERTY CHANGE: Adding SOURCEDIR property. Its value is 'D:\'.
MSI (c) (D4:7C) [20:19:11:718]: PROPERTY CHANGE: Adding VersionHandler property. Its value is '3.01'.
=== Logging started: 2/12/2015  20:19:11 ===
MSI (c) (D4:B4) [20:19:11:734]: Note: 1: 2262 2: PatchPackage 3: -2147287038 
MSI (c) (D4:B4) [20:19:11:734]: Machine policy value 'DisableRollback' is 0
MSI (c) (D4:B4) [20:19:11:734]: User policy value 'DisableRollback' is 0
MSI (c) (D4:B4) [20:19:11:734]: PROPERTY CHANGE: Adding UILevel property. Its value is '5'.
MSI (c) (D4:B4) [20:19:11:734]: PROPERTY CHANGE: Adding ACTION property. Its value is 'INSTALL'.
MSI (c) (D4:B4) [20:19:11:734]: Doing action: INSTALL
MSI (c) (D4:B4) [20:19:11:734]: Note: 1: 2262 2: ActionText 3: -2147287038 
Action 20:19:11: INSTALL. 
Action start 20:19:11: INSTALL.
MSI (c) (D4:B4) [20:19:11:734]: UI Sequence table 'InstallUISequence' is present and populated.
MSI (c) (D4:B4) [20:19:11:734]: Running UISequence
MSI (c) (D4:B4) [20:19:11:734]: PROPERTY CHANGE: Adding EXECUTEACTION property. Its value is 'INSTALL'.
MSI (c) (D4:B4) [20:19:11:734]: Doing action: DIRCA_CheckFX
Action 20:19:11: DIRCA_CheckFX. 
Action start 20:19:11: DIRCA_CheckFX.
MSI (c) (D4:A4) [20:19:11:796]: Invoking remote custom action. DLL: C:\DOCUME~1\admin\LOCALS~1\Temp\MSI161.tmp, Entrypoint: CheckFX
MSI (c) (D4:54) [20:19:11:812]: Cloaking enabled.
MSI (c) (D4:54) [20:19:11:812]: Attempting to enable all disabled priveleges before calling Install on Server
MSI (c) (D4:54) [20:19:11:812]: Connected to service for CA interface.
Action ended 20:19:12: DIRCA_CheckFX. Return value 3.
MSI (c) (D4:B4) [20:19:12:218]: Doing action: FatalErrorForm
Action 20:19:12: FatalErrorForm. 
Action start 20:19:12: FatalErrorForm.

魔方。

【问题讨论】:

请记住,win7 和 win 8 都预装了 .NET 4,这对 win XP 无效。如果您的 seup 文件未指定安装 .NET,您可能会遇到问题 但是我已经在windows xp中安装了.NET4 this question 中有类似的错误消息。接受的答案是从 VS 2010 安装中复制一个 dll。 vs2013 创建的安装文件总是在安装前检查 dot net 4.5,即使我在创建安装文件之前将项目解决方案更改为 dot net 4。 我有你的问题。你找到答案了吗? 【参考方案1】:

我将尝试记录基本问题。有问题的是嵌入在 MSI 中的 DLL,它提供了安装程序使用的自定义操作,例如此处失败的 CheckFx() 函数。检查已安装的 .NET Framework 版本的帮助函数。您可以在 C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\CommonExtensions\Microsoft\VSI\bin\dpca.dll 中找到它。

核心问题是这个DLL不再兼容XP。 VS2012 是第一个开始更改可执行文件所需的最低 Windows 版本的 VS 版本。从 Visual Studio 命令提示符运行 Dumpbin.exe /headers dpca.dll 可以看到一些内容。输出,修剪以适应:

Dump of file dpca.dll

PE signature found

File Type: DLL

...

OPTIONAL HEADER VALUES
             10B magic # (PE32)
           12.00 linker version
           34200 size of code
            8800 size of initialized data
               0 size of uninitialized data
           133E3 entry point (100133E3)
            1000 base of code
           36000 base of data
        10000000 image base (10000000 to 1003FFFF)
            1000 section alignment
             200 file alignment
            6.00 operating system version              // <=== here
           10.00 image version
            6.00 subsystem version                     // <=== here
               0 Win32 version
        ... etc

注意标注的版本号,6.00 是 Windows 版本的 Vista。 XP属于上一代,大版本5。不可避免的自定义动作失败,DLL无法在XP上加载。

解决此问题在技术上是可行的,您需要将 dpca.dll 替换为旧版本,该版本仍可在 XP 上运行。您需要访问早期版本的 VS,2010 或更低版本。 this Q+A的话题。

否则会再次提醒您,XP 真的结束了。将支持成本转嫁给您的客户,他们往往会开始做正确的事情:) 但是对此无能为力。

【讨论】:

【参考方案2】:

我使用的是 Microsoft 的 Visual Studio 安装程序,在谷歌搜索没有任何答案后,我决定试用 Flexera Software 的 InstallShield Limited Edition。这已成功安装在我的 Windows XP 机器上。

【讨论】:

以上是关于windows xp 下无法运行 VS2013 创建的安装文件的主要内容,如果未能解决你的问题,请参考以下文章

用VS2012或VS2013在win7下编写的程序在XP下运行就出现“不是有效的win32应用程序

如何使用VS 2013发布一个可以在Windows XP中独立运行的可执行文件

用vs2008做的MFC程序,怎么在WINDOWS XP下运行?

Visual Studio让用VS2012/VS2013编写的程序在XP中顺利运行(转)

visual c++ 2012 应用程序无法在 windows xp 下运行 - 已更新

如何在VS2012下静态构建Qt 4.8/5.2,使用静态MSVC运行时,支持Windows XP?