Jump to content
Sign in to follow this  
residualfail

FileInstall entire directory

Recommended Posts

residualfail

Hello:

Is there a way I can use either FileInstall or an alternative command to install an entire directory into my executable? I tried the below line but I believe I can only specify a single file at a time with that command.

FileInstall("E:\Apps\scripts\include\*.*", "C:\menuinstall\*.*")

Thanks!

-Chris

Share this post


Link to post
Share on other sites
engine

If your line doesn't work, try this:

$hFile = FileFindFirstFile("E:\Apps\scripts\include\*.*")
While 1
    $sFile = FileFindNextFile($hFile)
    If @error Then ExitLoop
    FileInstall("E:\Apps\scripts\include\" & $sFile, "C:\menuinstall\" & $sFile)
WEnd
FileClose($hFile)

I didn't tried it. But it's supposed to work.


My contributions:Local account UDF Registry UDFs DriverSigning UDF Windows Services UDF [url="http://www.autoitscript.com/forum/index.php?showtopic=81880"][/url]

Share this post


Link to post
Share on other sites
Richard Robertson

No that will not work at all. Variables can NOT be used for the source in FileInstall.

You have to specify every file individually.

Edited by Richard Robertson

Share this post


Link to post
Share on other sites
engine

In that case it's no big deal. If you have that many files that it's so annoying to write them individually, you can write a second script that searches for the files one by one and writes the FileInstall() lines to your script. It can be made.


My contributions:Local account UDF Registry UDFs DriverSigning UDF Windows Services UDF [url="http://www.autoitscript.com/forum/index.php?showtopic=81880"][/url]

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.