如何获取临时Inno安装文件所在的路径 [英] How to get path where is temporary Inno setup file is located

查看:179
本文介绍了如何获取临时Inno安装文件所在的路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个从Inno安装脚本中调用的DLL,dll希望从可执行文件所在的路径中加载某些文件.

I have a DLL that I am calling from Inno setup script, dll is looking to load some file from the path where executable is located.

在我执行安装程序的情况下,临时可执行文件会导出到temp文件夹is-xxxxx中

In my case when I execute the setup, temporary executable is exported in temp folder is-xxxxx

顺便说一句,{tmp}不是正确的.这是另一个tmp文件夹,但不是临时安装的文件夹.

BTW, {tmp} is not the right one. It is another tmp folder but not the one that temporary setup.

我需要知道,在inno设置中,有一个常量来表示该文件夹.

I need to know that in inno setup is there a constant to represent that folder.

谢谢.

推荐答案

您的DLL可以确定将其提取到的路径,还可以确定临时可执行文件的路径.这样做的方式取决于DLL的编写语言.

Your DLL can determine which path it's been extracted to and it can also determine the path of the temporary executable. The way you do it depends on the language your DLL is written in.

但是Windows Windows API的关键调用是 GetModuleFileName

But the Key Windows API call is GetModuleFileName

如果您的DLL是用Delphi编写的,则可以使用以下命令获取Setup.exe的路径

If your DLL was written in Delphi you could use the following to get the path of Setup.exe

ExtractFilePath(ParamStr(0))

这篇关于如何获取临时Inno安装文件所在的路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆