Sign in to follow this  
Followers 0
Kirk W

FileInstall() limitation?

10 posts in this topic

I am working on a program to install a printer (and driver) working with administrative permissions. So far, things seem to be great but for one thing:

The driver files never get installed. I create the directory in advance to ensure it exists. I don't know if this has anything to do with it or not. But the files add up to 5.4 MB of disk space. Is there an upper limit on the size of files? (I tried to reduce the number with a compiled zip file and it doesn't work either.)

Kirk

Share this post


Link to post
Share on other sites



Is the path a variable? FileInstall can't use variables for the source, only for the destination

Share this post


Link to post
Share on other sites

I had tried using a variable for the source, but corrected that mistake. And it would appear that the file(s) are being embeded into the executable based on size. But they just don't seem to be installed.

Share this post


Link to post
Share on other sites

I had tried using a variable for the source, but corrected that mistake. And it would appear that the file(s) are being embeded into the executable based on size. But they just don't seem to be installed.

Should work fine on big files..

What is the return code from FileInstall() ?

Show us your FileInstall() line to see what could be wrong ...


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Well, here is some more information. It would seem that the problem comes when I try to embed too many files. (The smallest file set is some 30 files, but one printer has 70 files in the driver set.) Also, after having the problem once, it seems to no longer work until I reboot the PC.

The problem isn't a big one really. I can simply use FileInstall to place a self-extracting file and then extract the files. But if there is a limitation on the number of files that can be embeded, it would be nice to know what the limit is.

Kirk

Share this post


Link to post
Share on other sites

AFAIK, it would have the same limit as a conventional zip file, 2 Gig for 9x and 4 Gig for NT. Without showing your FileInstall code that is not working, then it is a waste of time for us to try to help.

Share this post


Link to post
Share on other sites

Here is the snippet of code that I have been trying:

DirCreate("c:\printers\bhprt12099")
FileInstall("c:\printer\1320\autorun.inf", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\EZInstall.exe", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\EZInstall.ini", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hpb1320v.dat", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hpbhealr.dl_", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hpbmdl01.dat", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hpbmmon.dll", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hpbmmon.dl_", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hpc11605.gp_", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hpc11605.xm_", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hpc1160b.cat", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hpc1160b.inf", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hpc1160b.in_", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hpc13205.gp_", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hpc13205.xm_", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hpc1320b.in_", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hpc1320w.ht_", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hpc1320w.sw_", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hpc1320w.xm_", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hpc1xxx5.gp_", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hpcdmc32.dl_", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hpdomon.dl_", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hplj1xxx.ex_", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hpz3a041.dl_", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hpz5r041.dl_", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hpzar041.hl_", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\Hpzc3212.dll", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hpzcs041.hl_", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hpzda041.hl_", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hpzde041.hl_", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hpzel041.hl_", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hpzen041.hl_", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hpzes041.hl_", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hpzev041.dl_", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hpzfi041.hl_", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hpzfr041.hl_", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hpzhc041.hl_", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hpzhe041.hl_", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hpzht041.hl_", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hpzhu041.hl_", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hpzid413.cat", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hpzid413.inf", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hpzipa13.cat", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hpzipa13.inf", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hpzipr13.cat", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hpzipr13.inf", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hpzist13.cat", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hpzist13.inf", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hpzit041.hl_", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hpzius13.cat", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hpzius13.inf", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hpzja041.hl_", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hpzko041.hl_", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hpznl041.hl_", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hpzno041.hl_", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hpzpl041.hl_", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hpzpp041.dll", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hpzpp041.dl_", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hpzpt041.hl_", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hpzru041.hl_", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hpzsc041.dt_", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hpzsk041.hl_", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hpzsm041.gp_", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hpzss041.dl_", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hpzst041.dl_", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hpzsv041.hl_", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hpzth041.hl_", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hpztr041.hl_", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\HPZUCI12.DLL", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\hpzui041.dl_", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\stdnames.gp_", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\unidrv.dl_", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\unidrv.hl_", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\unidrvui.dl_", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\1320\unires.dl_", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\printers\bhprt12099.reg", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\printers\bhprt12099.cmd", "c:\printers\bhprt12099", 1)
FileInstall("c:\printer\printers\BHPRT12099.exe", "C:\printers", 1)

I don't have aproblem with two or three files. But when I insert as many files as above it seems to stop working. (Running it non-compiled still works fine.) And once it fails, then none of the FileInstall() lines work until I reboot before compiling.

As a note, I have tried this on two machines with the same results.

Share this post


Link to post
Share on other sites

You forgot to add \ at the end

FileInstall("c:\printer\1320\autorun.inf", "c:\printers\bhprt12099", 1)

FileInstall("c:\printer\1320\EZInstall.exe", "c:\printers\bhprt12099", 1)

SHOULD BE

FileInstall("c:\printer\1320\autorun.inf", "c:\printers\bhprt12099\", 1)

FileInstall("c:\printer\1320\EZInstall.exe", "c:\printers\bhprt12099\", 1)

OR

FileInstall("c:\printer\1320\autorun.inf", "c:\printers\bhprt12099\autorun.inf", 1)

FileInstall("c:\printer\1320\EZInstall.exe", "c:\printers\bhprt12099\EZInstall.exe", 1)


AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line

Share this post


Link to post
Share on other sites

Danny35d is right.

In general, File*() functions that can expect a file path or a directory path as the destination, you should consider adding a trailing backslash for directory paths to make it work. The trailing baskslash is mentioned on the destination parameter of FileInstall() on the FileInstall() help page for future reference.

It is perhaps a good tip to consider using a variable for your destination, so change of path or reducing typos are easily handled.

:)

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