#713 closed Feature Request (Rejected)
FileInstall() to accept macros and environment variables.
| Reported by: | Hubertus | Owned by: | |
|---|---|---|---|
| Milestone: | Component: | AutoIt | |
| Version: | Severity: | None | |
| Keywords: | FileInstall macros environment-variables | Cc: |
Description
It would be handy, if FileInstall() would accept macros and environment variables.
This information is available at compile time.
The syntax could look like this:
FileInstall("%USERPROFILE%\Eigene Dateien\AutoIt\@scriptname@", $sTempfile)
Or
FileInstall("@MyDocumentsDir@\AutoIt\@scriptname@", $sTempfile)
Or
FileInstall("@ScriptFullPath@", $sTempfile)
Attachments (0)
Change History (4)
comment:1 by , 17 years ago
| Version: | 3.2.12.1 |
|---|
comment:2 by , 17 years ago
| Resolution: | → Rejected |
|---|---|
| Status: | new → closed |
While it is true those expressions are available at compile-time they are also different than the run-time counter-parts. It's just unnecessary confusion. There are better ways to solve the problem.
comment:3 by , 17 years ago
A path should never be hard coded into source code. This requirement keeps me from sharing scripts that I create with others unless their file structure is configured the same way as mine. A couple of alternatives would be to have a registry key that would tell AutoIt where to look for files to install. You would then use a relative path in the FileInstall function. The other way would be to have a files folder within the AutoIt include folder. The FileInstall source path would then be relative to that path for example FileInstall ("MyFiles\MyFile.Ext", $destPath) would look for MyFile.Ext in <AutoIt Include>\MyFiles\MyFile.Ext)
comment:4 by , 17 years ago
I don't think you really understand how FileInstall() works. I suggest you not comment on the subject further until you realize how the function behaves because you're making a lot of assumptions and spouting a lot of gibberish that just doesn't make sense to someone who understands how FileINstall() works.

Automatic ticket cleanup.