Jump to content

FileInstall


 Share

Recommended Posts

Hi everyone

Can global variables, such as @scriptdir or @desktop be used in the fileinstall function?

If not, how do I get around this problem when I want to install files at the user's desktop location?

@ScriptDir and @DesktopDir are directory macros. You can use it as destination but you cannot use as source. This must be a literal string; it cannot be a variable.

When the words fail... music speaks.

Link to comment
Share on other sites

That's interesting.. I managed to use the @scriptdir for the output, which is fine. However, it doesn't seem to extract files one folder deeper (these files are bitmap images). Is there a reason for this?

Should not be a problem.Post the code and then we can help you more.

When the words fail... music speaks.

Link to comment
Share on other sites

if you go

fileinstall("C:\Users\USERNAME\Desktop\BC Program\bmp\code.bmp",@scriptdir & "\code.bmp")

does that work? or maybe try

fileinstall("C:\Users\USERNAME\Desktop\BC Program\start.txt",@scriptdir & "\start.txt")
dircreate(@scriptdir & '\bmp\)

fileinstall("C:\Users\USERNAME\Desktop\BC Program\bmp\code.bmp",@scriptdir & "\bmp\code.bmp")

*NOT TESTED*

Edited by bob00037
Link to comment
Share on other sites

I think I've confused myself with that this function does.

My belief:

It integrates the relevant files into the compiled program, and when the program is run, extracts the compiled files to the relevant folder.

However, now that I look at it, I don't think it does the above. I think that it integrates the relevant files once the program is run, and should the original files be deleted, recreates them.

So does someone mind shining some light on what this function exactly does? Because something tells me that this is not the function for me.

Link to comment
Share on other sites

idk lol im wanting this EXACT .bmp fileinstall (i cant do it) I THINK that it just coopies the foulder cause whenever i fileinstall any pics it doesnt do anything at all

Link to comment
Share on other sites

and congrats on your 100th post :)

Link to comment
Share on other sites

no problemo lol, what did u do to load the .bmp

did you fileinstall() it THEN make exe, and did this work on a seperate computer

OR

did you fileinstall()it and make the .bmp a binary?

OR did you fileinstall() it and copy from one dir to another... lol i dont understand fileinstall

Link to comment
Share on other sites

My initial understanding of fileinstall was correct.

File install allows you to literally store the relevant files in the compiled script. You need to provide the file path to the relevant file, and once your program is compiled, you can delete those files and your program will still run given that you recreate the files in the same spot, and what-not.

The mistake I was making was that I hadn't created the relevant folder for fileinstall to work, and since fileinstall cannot create folders, the files weren't copied, and hence, my problem.

Link to comment
Share on other sites

  • 2 weeks later...

Hi everyone

Can global variables, such as @scriptdir or @desktop be used in the fileinstall function?

If not, how do I get around this problem when I want to install files at the user's desktop location?

I have provided 3 fully commented examples on FileInstall on my site at the link below. Hope this helps.

HeidiRFind free applications, code examples and more on my site at:http://heidisdownloads.com/
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...