2014-09-21 225 views
0

我正在使用VS安装项目生成安装程序。 为了修复生成的MSI的版本,我们有一个脚本来修改生成的MSI的产品代码和版本。虽然产品代码不同,但MSIEXEC未能安装“已安装此产品的较新版本”产品

我安装了MSI的早期版本,当我尝试安装新版本(我们在设置项目中有“RemovePreviousVersions = true”)时,安装失败并显示“此产品的较新版本已安装”。

我验证了较新的版本确实有较大的版本号(3.910.5377 VS 3.901.5374)和不同的产品GUID。

什么可能会引发这个故障?

下面

是灌输日志:

=== Logging started: 21/09/2014 11:33:59 === 
Action start 11:33:59: INSTALL. 
Action start 11:33:59: DIRCA_CheckFX. 
INFO : [09/21/2014 11:33:59:708] [CheckFX         ]: Custom Action is starting... 
INFO : [09/21/2014 11:33:59:709] [CheckFX         ]: CoInitializeEx - COM initialization Apartment Threaded... 
INFO : [09/21/2014 11:33:59:710] [CheckFX         ]: MsiGetPropertyW - Determine size of property 'VSDFrameworkVersion' 
INFO : [09/21/2014 11:33:59:710] [CheckFX         ]: Allocating space... 
INFO : [09/21/2014 11:33:59:710] [CheckFX         ]: MsiGetPropertyW - Getting Property 'VSDFrameworkVersion'... 
INFO : [09/21/2014 11:33:59:711] [CheckFX         ]: Property 'VSDFrameworkVersion' retrieved with value 'v4.0'. 
INFO : [09/21/2014 11:33:59:711] [CheckFX         ]: MsiGetPropertyW - Determine size of property 'VSDFrameworkProfile' 
INFO : [09/21/2014 11:33:59:711] [CheckFX         ]: Allocating space... 
INFO : [09/21/2014 11:33:59:711] [CheckFX         ]: MsiGetPropertyW - Getting Property 'VSDFrameworkProfile'... 
INFO : [09/21/2014 11:33:59:711] [CheckFX         ]: Property 'VSDFrameworkProfile' retrieved with value 'Client'. 
INFO : [09/21/2014 11:33:59:712] [CheckFX         ]: Set VSDNETMSG with the FrameworkVersion. 
INFO : [09/21/2014 11:33:59:712] [CheckFX         ]: MsiGetPropertyW - Determine size of property 'VSDNETMSG' 
INFO : [09/21/2014 11:33:59:712] [CheckFX         ]: Allocating space... 
INFO : [09/21/2014 11:33:59:712] [CheckFX         ]: MsiGetPropertyW - Getting Property 'VSDNETMSG'... 
INFO : [09/21/2014 11:33:59:712] [CheckFX         ]: Property 'VSDNETMSG' retrieved with value 'This setup requires the .NET Framework version [1]. Please install the .NET Framework and run this setup again.'. 
INFO : [09/21/2014 11:33:59:713] [CheckFX         ]: MsiSetPropertyW - Setting Property Value... 
INFO : [09/21/2014 11:33:59:713] [CheckFX         ]: MsiSetPropertyW - Setting property 'VSDNETMSG' to 'This setup requires the .NET Framework version 4.0. Please install the .NET Framework and run this setup again.'. 
INFO : [09/21/2014 11:33:59:713] [CheckFX         ]: MsiGetPropertyW - Determine size of property 'VSDNETURLMSG' 
INFO : [09/21/2014 11:33:59:713] [CheckFX         ]: Allocating space... 
INFO : [09/21/2014 11:33:59:714] [CheckFX         ]: MsiGetPropertyW - Getting Property 'VSDNETURLMSG'... 
INFO : [09/21/2014 11:33:59:714] [CheckFX         ]: Property 'VSDNETURLMSG' retrieved with value 'This setup requires the .NET Framework version [1]. Please install the .NET Framework and run this setup again. The .NET Framework can be obtained from the web. Would you like to do this now?'. 
INFO : [09/21/2014 11:33:59:714] [CheckFX         ]: MsiSetPropertyW - Setting Property Value... 
INFO : [09/21/2014 11:33:59:714] [CheckFX         ]: MsiSetPropertyW - Setting property 'VSDNETURLMSG' to 'This setup requires the .NET Framework version 4.0. Please install the .NET Framework and run this setup again. The .NET Framework can be obtained from the web. Would you like to do this now?'. 
INFO : [09/21/2014 11:33:59:715] [CheckFX         ]: MsiSetPropertyW - Setting Property Value... 
INFO : [09/21/2014 11:33:59:715] [CheckFX         ]: MsiSetPropertyW - Setting property 'VSDFXAvailable' to 'TRUE'. 
INFO : [09/21/2014 11:33:59:715] [CheckFX         ]: Writing config file with version: '4.0'... 
INFO : [09/21/2014 11:33:59:716] [CheckFX         ]: Creating Config File... 
DEBUG : [09/21/2014 11:33:59:716] [CheckFX         ]: Calling MsiGetActiveDatabase... 
DEBUG : [09/21/2014 11:33:59:716] [CheckFX         ]: Calling MsiDatabaseOpenView... 
DEBUG : [09/21/2014 11:33:59:717] [CheckFX         ]: Calling MsiViewExecute... 
DEBUG : [09/21/2014 11:33:59:717] [CheckFX         ]: Calling MsiViewFetch... 
DEBUG : [09/21/2014 11:33:59:717] [CheckFX         ]: Calling MsiRecordDataSize... 
INFO : [09/21/2014 11:33:59:718] [CheckFX         ]: MsiSetPropertyW - Setting Property Value... 
INFO : [09/21/2014 11:33:59:718] [CheckFX         ]: MsiSetPropertyW - Setting property 'VSDFxConfigFile' to 'C:\Users\OREN~1.RE-\AppData\Local\Temp\CFG8BB2.tmp'. 
INFO : [09/21/2014 11:33:59:718] [CheckFX         ]: Custom Action succeeded. 
INFO : [09/21/2014 11:33:59:719] [CheckFX         ]: Custom Action completed with return code: '0' 
Action ended 11:33:59: DIRCA_CheckFX. Return value 1. 
Action start 11:33:59: AppSearch. 
Action ended 11:33:59: AppSearch. Return value 1. 
Action start 11:33:59: FindRelatedProducts. 
Action ended 11:33:59: FindRelatedProducts. Return value 1. 
Action start 11:33:59: ERRCA_CANCELNEWERVERSION. 
MSI (s) (88:FC) [11:33:59:723]: Product: MyProd -- Unable to install because a newer version of this product is already installed. 

Unable to install because a newer version of this product is already installed. 
Action ended 11:33:59: ERRCA_CANCELNEWERVERSION. Return value 3. 
Action ended 11:33:59: INSTALL. Return value 3. 
Property(S): UpgradeCode = {695EE149-3040-435B-BF0D-F57C3053ECA6} 
Property(S): DesktopFolder = C:\Users\oren.company\Desktop\ 
Property(S): ProgramMenuFolder = C:\Users\oren.company\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\ 
Property(S): VSDFXAvailable = TRUE 
Property(S): VSDFrameworkVersion = v4.0 
Property(S): VSDFrameworkProfile = Client 
Property(S): VSDAllowLaterFrameworkVersions = False 
Property(S): SERVERADDRESS = oren-pc 
Property(S): ProductName = MyProd 
Property(S): ProductCode = {d46578ca-87f8-4335-90b9-bc362b8bd367} 
Property(S): ProductVersion = 3.910.5377 
Property(S): Manufacturer = XXX 
Property(S): ARPCONTACT = XXX 
Property(S): ARPURLINFOABOUT = www.company.com 
Property(S): ProductLanguage = 1033 
Property(S): ARPPRODUCTICON = _853F67D554F05449430E7E.exe 
Property(S): SecureCustomProperties = PREVIOUSVERSIONSINSTALLED;NEWERPRODUCTFOUND 
Property(S): NEWERPRODUCTFOUND = {f13569d9-45f2-45b7-b766-4816a93c1d87} 
Property(S): RedirectedDllSupport = 2 
Property(S): VersionNT = 601 
Property(S): VSDNETURLMSG = This setup requires the .NET Framework version 4.0. Please install the .NET Framework and run this setup again. The .NET Framework can be obtained from the web. Would you like to do this now? 
Property(S): VSDIISMSG = This setup requires Internet Information Server 5.1 or higher and Windows XP or higher. This setup cannot be installed on Windows 2000. Please install Internet Information Server or a newer operating system and run this setup again. 
Property(S): VSDUIANDADVERTISED = This advertised application will not be installed because it might be unsafe. Contact your administrator to change the installation user interface option of the package to basic. 
Property(S): VSDNETMSG = This setup requires the .NET Framework version 4.0. Please install the .NET Framework and run this setup again. 
Property(S): VSDINVALIDURLMSG = The specified path '[2]' is unavailable. The Internet Information Server might not be running or the path exists and is redirected to another machine. Please check the status of this virtual directory in the Internet Services Manager. 
Property(S): VSDVERSIONMSG = Unable to install because a newer version of this product is already installed. 
Property(S): AdminMaintenanceForm_Action = Repair 
Property(S): DefaultUIFont = VsdDefaultUIFont.524F4245_5254_5341_4C45_534153783400 
Property(S): ErrorDialog = ErrorDialog 
Property(S): SFF_UpFldrBtn = UpFldrBtn 
Property(S): SFF_NewFldrBtn = NewFldrBtn 
Property(S): EDITA4 = 1 
Property(S): EDITA3 = 1 
Property(S): EDITA2 = 1 
Property(S): EDITA1 = 1 
Property(S): EulaForm_Property = No 
Property(S): MaintenanceForm_Action = Repair 
Property(S): CustomTextA_NextArgs = EulaForm 
Property(S): EulaForm_PrevArgs = CustomTextA 
Property(S): EulaForm_NextArgs = WelcomeForm 
Property(S): WelcomeForm_PrevArgs = EulaForm 
Property(S): WelcomeForm_NextArgs = ConfirmInstallForm 
Property(S): ConfirmInstallForm_PrevArgs = WelcomeForm 
Property(S): AdminWelcomeForm_NextArgs = AdminFolderForm 
Property(S): AdminFolderForm_PrevArgs = AdminWelcomeForm 
Property(S): AdminFolderForm_NextArgs = AdminConfirmInstallForm 
Property(S): AdminConfirmInstallForm_PrevArgs = AdminFolderForm 
Property(S): MsiLogFileLocation = C:\Users\oren.company\AppData\Local\Temp\msi1.log 
Property(S): PackageCode = {240303AC-B280-41A4-BB80-E82DD274E006} 
Property(S): ProductState = -1 
Property(S): PackagecodeChanging = 1 
Property(S): REBOOT = ReallySuppress 
Property(S): CURRENTDIRECTORY = C:\Users\oren.company\AppData\Local\Temp 
Property(S): CLIENTUILEVEL = 3 
Property(S): CLIENTPROCESSID = 1276 
Property(S): MsiRestartManagerSessionKey = 866e59d34f5b104a9d87126a30675d33 
Property(S): MsiSystemRebootPending = 1 
Property(S): VersionDatabase = 200 
Property(S): VersionMsi = 5.00 
Property(S): VersionNT64 = 601 
Property(S): WindowsBuild = 7601 
Property(S): ServicePackLevel = 1 
Property(S): ServicePackLevelMinor = 0 
Property(S): MsiNTProductType = 1 
Property(S): WindowsFolder = C:\Windows\ 
Property(S): WindowsVolume = C:\ 
Property(S): System64Folder = C:\Windows\system32\ 
Property(S): SystemFolder = C:\Windows\SysWOW64\ 
Property(S): RemoteAdminTS = 1 
Property(S): TempFolder = C:\Users\OREN~1.RE-\AppData\Local\Temp\ 
Property(S): ProgramFilesFolder = C:\Program Files (x86)\ 
Property(S): CommonFilesFolder = C:\Program Files (x86)\Common Files\ 
Property(S): ProgramFiles64Folder = C:\Program Files\ 
Property(S): CommonFiles64Folder = C:\Program Files\Common Files\ 
Property(S): AppDataFolder = C:\Users\oren.company\AppData\Roaming\ 
Property(S): FavoritesFolder = C:\Users\oren.company\Favorites\ 
Property(S): NetHoodFolder = C:\Users\oren.company\AppData\Roaming\Microsoft\Windows\Network Shortcuts\ 
Property(S): PersonalFolder = C:\Users\oren.company\Documents\ 
Property(S): PrintHoodFolder = C:\Users\oren.company\AppData\Roaming\Microsoft\Windows\Printer Shortcuts\ 
Property(S): RecentFolder = C:\Users\oren.company\AppData\Roaming\Microsoft\Windows\Recent\ 
Property(S): SendToFolder = C:\Users\oren.company\AppData\Roaming\Microsoft\Windows\SendTo\ 
Property(S): TemplateFolder = C:\Users\oren.company\AppData\Roaming\Microsoft\Windows\Templates\ 
Property(S): CommonAppDataFolder = C:\ProgramData\ 
Property(S): LocalAppDataFolder = C:\Users\oren.company\AppData\Local\ 
Property(S): MyPicturesFolder = C:\Users\oren.company\Pictures\ 
Property(S): AdminToolsFolder = C:\Users\oren.company\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Administrative Tools\ 
Property(S): StartupFolder = C:\Users\oren.company\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\ 
Property(S): StartMenuFolder = C:\Users\oren.company\AppData\Roaming\Microsoft\Windows\Start Menu\ 
Property(S): FontsFolder = C:\Windows\Fonts\ 
Property(S): GPTSupport = 1 
Property(S): OLEAdvtSupport = 1 
Property(S): ShellAdvtSupport = 1 
Property(S): MsiAMD64 = 6 
Property(S): Msix64 = 6 
Property(S): Intel = 6 
Property(S): PhysicalMemory = 7783 
Property(S): VirtualMemory = 8854 
Property(S): AdminUser = 1 
Property(S): MsiTrueAdminUser = 1 
Property(S): LogonUser = oren 
Property(S): UserSID = S-1-5-21-2662074009-2945771039-325267052-1127 
Property(S): UserLanguageID = 1037 
Property(S): ComputerName = OREN-PC 
Property(S): SystemLanguageID = 1033 
Property(S): ScreenX = 1024 
Property(S): ScreenY = 768 
Property(S): CaptionHeight = 22 
Property(S): BorderTop = 1 
Property(S): BorderSide = 1 
Property(S): TextHeight = 16 
Property(S): TextInternalLeading = 3 
Property(S): ColorBits = 32 
Property(S): TTCSupport = 1 
Property(S): Time = 11:33:59 
Property(S): Date = 9/21/2014 
Property(S): MsiNetAssemblySupport = 4.0.30319.18408 
Property(S): MsiWin32AssemblySupport = 6.1.7601.17514 
Property(S): MsiRunningElevated = 1 
Property(S): Privileged = 1 
Property(S): USERNAME = oren 
Property(S): DATABASE = C:\Windows\Installer\4858a8a.msi 
Property(S): OriginalDatabase = C:\Windows\TEMP\MyProd.msi 
Property(S): UILevel = 2 
Property(S): ACTION = INSTALL 
Property(S): VSDFxConfigFile = C:\Users\OREN~1.RE-\AppData\Local\Temp\CFG8BB2.tmp 
MSI (s) (88:FC) [11:33:59:733]: Product: MyProd -- Installation failed. 

MSI (s) (88:FC) [11:33:59:734]: Windows Installer installed the product. Product Name: MyProd. Product Version: 3.910.5377. Product Language: 1033. Manufacturer: XXX. Installation success or error status: 1603. 

=== Logging stopped: 21/09/2014 11:33:59 === 

回答

2

您的脚本不正确:)您还必须更改正在构建的MSI的PackageCode,这是VS在您使用IDE更改版本时无形地显示的内容。

+0

首先,谢谢!我仍然试图验证这一点。我改变了我的脚本,改变了我在其他地方也引用过的packageCode(我不确定这是否为修订号)。我遇到了一些困难,因为现在MSI在安装新版本之前不会卸载以前的版本。我想这可能是由于别的。 – OSH 2014-09-24 06:05:14

+1

UpgradeCode必须相同,ProductCode不同,MSI版本必须在前三个字段中增加,并且每个用户不会升级每台机器,反之亦然。 – PhilDW 2014-09-24 16:43:54

1

这可能是因为您对ProductVersion property的第二个字段使用的值不合适而导致的。 ProductVerison属性的最大值为255.255.65535

+0

感谢您的建议。我将产品版本更改为3.9.1,但仍然看到相同的问题。 – OSH 2014-09-22 13:47:12

+0

我认为这还不够。您还应该更改已安装产品的产品版本(例如从3.901.5374更改为3.9.0),然后重新测试您的设置。因此,您应该先手动删除3.901.5374产品版本,重建3.901.5374设置以使用3.9.0产品版本,然后重新测试您的设置。 – 2014-09-23 07:31:55