在用installshield2015出包的时候运行:
C:\Windows\SysWOW64\cscript.exe ImportExportString.vbs installshield\LCSInstallation\LCSInstallation.bak.ism installshield\LCSInstallation\stringTable.txt 2052 I
时报错:
Microsoft VBScript runtime error: ActiveX component can't create > object: 'ISWiAuto21.ISWiProject'
环境时Windows 64位,按照下面的解释:
64-bit Systems An important thing to note is the InstallShield
Automation Interface is a 32-bit interface so it must be loaded from a
32-bit process. If you are using a 64-bit machine, like most current
Windows operating systems, you will need to load the automation
interface through a 32-bit executable file. To do this you would
launch cscript.exe from the 32-bit system folder (SysWow64), which is
typically located at: C:\Windows\SysWOW64. If you do not you may
encounter the following error:Microsoft VBScript runtime error: ActiveX component can’t create
object: ‘ISWiAuto21.ISWiProject’
应该使用64位下的C:\Windows\SysWOW64\cscript.exe运行,但是代码中已经使用了此处的运行程序,依然报错。
最后,发现原因时installshield的版本不对,按照下面的提示:
現在我們已經升級到windows 2012服務器和InstallShield
2014。我已經檢查了兩次,根據InstallShield,唯一需要的更改是ver號(17個更改為21)。
应该将代码中2014对应的21,改为2015版本对应的22,即:
Dim ISWIProject
Set ISWIProject = CreateObject("IswiAuto21.ISWiProject"): CheckError
修改为:
Dim ISWIProject
Set ISWIProject = CreateObject("IswiAuto22.ISWiProject"): CheckError