我正在为Excel加载项使用InstallShield 2012构建安装包。由于MS Excel具有32位版本和64位版本,因此我需要分别构建安装包。理想情况下,在将文件复制到目标计算机之前,安装文件应该能够在安装的前几个步骤中检测Excel位(不是Windows位)。但是,经过一些在线广泛的研究,我还没有找到确定Excel位的可靠方法。任何人有一些想法,请随时提供帮助。谢谢确定InstallShield 2012中的Excel位数
1
A
回答
1
这是我使用的(LUA - Setup Factory)代码:即使未安装Outlook,它也能正常工作。
-- check if 64 bit office installed
s64_14 = Registry.GetValue(3, "Software\\Wow6432Node\\Microsoft\\Office\\14.0\\Outlook","Bitness",true);
s64_15 = Registry.GetValue(3, "Software\\Wow6432Node\\Microsoft\\Office\\15.0\\Outlook","Bitness",true);
s64_16 = Registry.GetValue(3, "Software\\Wow6432Node\\Microsoft\\Office\\16.0\\Outlook","Bitness",true);
bl64Bit = false;
if (s64_14=="x64" or s64_15=="x64" or s64_16=="x64") then
bl64Bit = true
end
-- check for 64-bit OS
bl64BitOS=false;
if SessionVar.Expand("%ProgramFilesFolder%") ~= SessionVar.Expand("%ProgramFilesFolder64%") then
bl64BitOS=true
end
0
我有一个Advanced Installer用户类似的讨论,你可以检查出来的our forums,用户想要检测办公室位数。
+0
您不能依赖您的答案中提到的“Bitness”注册表项。如果您从* standalone * Excel安装进行安装,则此密钥不存在。 – 2014-09-24 08:22:31
0
您应该创建2个属性以跟踪安装了哪个版本的Excel,然后将这些属性用作特征条件“EXCEL32_EXISTS = 0”。以下是我用来完成此操作的代码,最初将EXCEL32_EXISTS和EXCEL64_EXISTS都设置为0.
Excel_Installed=FALSE;
szKey = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\excel.exe";
if (RegDBKeyExist(szKey)=1) then
Excel_Installed=TRUE;
RegDBGetKeyValueEx (szKey, "Path", nvType, ExcelPath, nvSize);
SprintfMsiLog("Found Excel @ %s", ExcelPath);
if (StringContains(ExcelPath, "Office11")=TRUE) then
Excel_Installed=FALSE;
elseif (SYSINFO.bIsWow64=FALSE) then
MsiSetProperty(hMSI, "EXCEL32_EXISTS", "1");
elseif ((StringContains(ExcelPath, "(x86)")=TRUE) || (StringContains(ExcelPath, "Office12")=TRUE)) then
MsiSetProperty(hMSI, "EXCEL32_EXISTS", "1");
else
MsiSetProperty(hMSI, "EXCEL64_EXISTS", "1");
endif;
endif;
export prototype BOOL StringContains(STRING,STRING);
function BOOL StringContains(szSource, szArgs)
BOOL bContains;
begin
if(szSource % szArgs) then
bContains = TRUE;
else
bContains = FALSE;
endif;
return bContains;
end;
相关问题
- 1. installshield 2012 SUPPORTDIR
- 2. installshield 2012 LE和Windows服务的Windows 2008 R2的64位VS.NEt 2012
- 3. 在InstallShield 2012中创建正确的应用程序池Spring LE
- 4. SSRS 2012中的Excel函数
- 5. 如何检查InstallShield 2012中的.NET 4?
- 6. Excel:重新定位excel中的数据
- 7. InstallShield 2008 Pro与Visual Studio 2012
- 8. Visual Studio 2012 InstallShield梦魇
- 9. InstallShield 2012内部错误
- 10. InstallShield 2012 - 先决条件
- 11. Installshield Excel加载项
- 12. InstallShield 2012:什么是连接到Oracle数据库的正确方法
- 13. 的InstallShield 2012未初始化重装后
- 14. 的Visual Studio 2012专业版和2012的InstallShield专业
- 15. 确定char中设定的位数
- 16. 最大尺寸.cab Visual Studio 2012 - InstallShield
- 17. InstallShield 2015 LE使Visual Studio 2012崩溃
- 18. 确定位数bash
- 19. 如何在64位应用程序中使用InstallShield 2012 TrialWare功能?
- 20. 从字符串中确定确定位置中的数字 - Java
- 21. Visual Studio 2012中的“浅的文件夹结构”InstallShield选项
- 22. Excel的VBA确定
- 23. 确定参数在drools中的位置
- 24. “InstallShield最佳实践验证套件”是installshield 2012 Premier的默认功能?
- 25. 是否可以使用逻辑OR或否定Installshield 2012 PRQ中的条件?
- 26. 如何在InstallShield中使用用户定义的保存位置?
- 27. Installshield复制文件脚本的确切位置
- 28. 在Visual Studio 2012中生成单个exe文件InstallShield 2012限制版本
- 29. 确定定义bash函数的位置
- 30. Installshield 64位项目设置
感谢Charles。我注意到在Outlook下有一个“有点”的价值,但是因为我安装了Outlook,所以我不确定在没有Outlook的情况下它是否仍然可用。所以你试图用Outlook从未安装? (我想排除Outlook安装和稍后卸载的情况,但保留已修改的注册表项) – wuxilixi 2013-05-10 20:10:22
是的,即使Outlook从未安装过,它也能正常工作。如果Outlook安装并卸载,我还没有测试过这种情况。 – 2013-05-11 16:37:47