在exe安装包执行安装时,exe会首先把文件都解压到%Temp%文件夹中,在还没有往InstallDir目录拷贝时,如果需要调用exe里面的文件就需要把文件放到Support Files中,如下图:

InstallShield获取SUPPORTDIR为空的解决方案(MsiGetProperty(hMSI, "SUPPORTDIR" is empty)

 

 

 InstallShield获取SUPPORTDIR为空的解决方案(MsiGetProperty(hMSI, "SUPPORTDIR" is empty)

 

 

但当通过InstallScript脚本始终无法获取SUPPORTDIR路径时,经过调试发现这个路径永远是“\”或空,那是因为这个Custom Action的执行必须是“立即执行(Immediate Execution)”,如果是Deferred Execution或是Commit Execution就会是空,所以需要把执行方式调成Immediate Execution,如下图:

InstallShield获取SUPPORTDIR为空的解决方案(MsiGetProperty(hMSI, "SUPPORTDIR" is empty)

 

 

相关文章:

  • 2022-01-02
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-08-10
  • 2021-07-03
  • 2022-12-23
  • 2022-12-23
  • 2021-10-21
  • 2021-06-17
相关资源
相似解决方案