Jump to content

FileInstall without destination directory?


Recommended Posts

When writing your own _FileInstall func maybe, with the original FileInstall no:

Quote

FileInstall

Include and install a file with the compiled script.

FileInstall ( "source", "dest" [, flag = 0] )

Parameters

source The source path of the file to compile. This must be a literal string; it cannot be a variable or the result of a function call. It can be a relative path (using .\ or ..\ in the path) to the source file (.au3).
dest The destination path of the file with trailing backslash if only the directory is used. This can be a variable.

 

Link to comment
Share on other sites

1 minute ago, AutoBert said:

When writing your own _FileInstall func maybe, with the original FileInstall no:

 

Yes, I have seen that in the help file, that's why I'm looking for other solutions. But I'm a beginner, and I have no idea on how to write my own _FileInstall function...

Link to comment
Share on other sites

@Marzupilami,

look here:

but, as stated - if you are a beginner, and there is no obvious benefit to not using FileInstall, then use FileInstall. use a temporary folder as a destination - that is a very common practice. use your images from there.

Signature - my forum contributions:

Spoiler

UDF:

LFN - support for long file names (over 260 characters)

InputImpose - impose valid characters in an input control

TimeConvert - convert UTC to/from local time and/or reformat the string representation

AMF - accept multiple files from Windows Explorer context menu

DateDuration -  literal description of the difference between given dates

Apps:

Touch - set the "modified" timestamp of a file to current time

Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes

SPDiff - Single-Pane Text Diff

 

Link to comment
Share on other sites

  • Moderators

@Marzupilami as Orbs suggests, if you want to keep it simple just use FileInstall with a temp directory and then clean up after yourself when the script is done (ignore the suggestion to jump right to writing your own function). The ResourcesEX UDF is really not that difficult once you play around with it, if you really can't have any files laid down on the target system.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

Thanks for the answers! I will have a look at the ResourcesEX UDF later and see if it's worth to try it or if I'll simply use FileInstall and a temp dir. :)

One question: If I've got it right, the FileInstall's "source" parameter is only used when compiling the script, and after that the file will be baked into the exe, and the "source" parameter will not be used again?

Link to comment
Share on other sites

If it's pictures you want to display without extracting to a directory... I can point you in the right direction. Firstly this page to imbed your pics without installing them at compile and then look at how UEZ uses it on that page. Specifically the _GDIPlus_BitmapCreateFromMemory function in the example. 

Anything having to do with GDI I look up posts by vip user UEZ he is very knowledgeable in that and many other areas. 

Link to comment
Share on other sites

4 minutes ago, Marzupilami said:

One question: If I've got it right, the FileInstall's "source" parameter is only used when compiling the script, and after that the file will be baked into the exe, and the "source" parameter will not be used again?

that is correct. here is a slightly improved explanation:

 

Signature - my forum contributions:

Spoiler

UDF:

LFN - support for long file names (over 260 characters)

InputImpose - impose valid characters in an input control

TimeConvert - convert UTC to/from local time and/or reformat the string representation

AMF - accept multiple files from Windows Explorer context menu

DateDuration -  literal description of the difference between given dates

Apps:

Touch - set the "modified" timestamp of a file to current time

Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes

SPDiff - Single-Pane Text Diff

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...