Sign in to follow this  
Followers 0
residualfail

FileInstall entire directory

5 posts in this topic

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



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

#3 ·  Posted (edited)

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

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  
Followers 0