jorgeng Posted June 12, 2008 Share Posted June 12, 2008 Hello! I have a webplace where customers login and download files. I now want them to download files to their disk and run an autoit-script. I have problems with downloading the files from autoit-script: the code in autoit-script/exe: $dir = ("C:\Program\Friendly" ) FileCopy("nordr.dbf", $dir, 1) FileCopy("nordr.dbt", $dir, 1) FileCopy("nscript.dbf", $dir, 1) FileCopy("nscript.dbt", $dir, 1) Is it possible for users to download autoit-exe file which run the filecopy-command and store files on computer-harddisk, i can't get it to function. The user today click on autoit-exe-file which works and install things in the customers program. Link to comment Share on other sites More sharing options...
TurionAltec Posted June 12, 2008 Share Posted June 12, 2008 Look at the Fileinstall function to include these other files right in the script exe. Fileinstall("c:\autoit\scripttobuild\nordr.dbf", $dir) Note the first value can't be a variable. Link to comment Share on other sites More sharing options...
jorgeng Posted June 12, 2008 Author Share Posted June 12, 2008 Look at the Fileinstall function to include these other files right in the script exe.Fileinstall("c:\autoit\scripttobuild\nordr.dbf", $dir)Note the first value can't be a variable.But when i am on the web i have no c: directory, so where do i copy from? Link to comment Share on other sites More sharing options...
cartman380 Posted June 12, 2008 Share Posted June 12, 2008 But when i am on the web i have no c: directory, so where do i copy from? How are you having them download the files now? Link to comment Share on other sites More sharing options...
jorgeng Posted June 12, 2008 Author Share Posted June 12, 2008 How are you having them download the files now?By mouse manuallay, save file... Link to comment Share on other sites More sharing options...
cartman380 Posted June 12, 2008 Share Posted June 12, 2008 By mouse manuallay, save file...Yes but are you using http, ftp, or something else? Link to comment Share on other sites More sharing options...
jorgeng Posted June 12, 2008 Author Share Posted June 12, 2008 Yes but are you using http, ftp, or something else?Today users have to click manually on four files on the web after login, save as on local disk, ex c:\temp,then on web click on autoit-exe file which run install on a program at users c:\program directory.I want the process to copy the four files on web to c:\temp and then run autoit-exe file on web which uses the four files on c:\temp and install to c:\program. Link to comment Share on other sites More sharing options...
cartman380 Posted June 12, 2008 Share Posted June 12, 2008 I'm assuming that you're having them go through internet explorer then? Perhaps looking up the _IE UDF in the help file will get you started in the right direction. Link to comment Share on other sites More sharing options...
TurionAltec Posted June 13, 2008 Share Posted June 13, 2008 But when i am on the web i have no c: directory, so where do i copy from? Fileinstall("c:\autoit\scripttobuild\nordr.dbf", $dir) With Fileinstall It's the C: drive of the computer used to compile the script (your computer). With the example code I gave. when the script is built to an exe, the compiler will take the file from your hard drive: "c:\autoit\scripttobuild\nordr.dbf" and include it in the script exe file. Then when the exe is run, it will copy that file to the location in the variable $dir. This is a good way to go as then your users only have to download one self contained file. If you want the program to independently download a file from a website, look at the Inetget function: InetGet ( "http://www.autoitscript.com/file.dbf" ,$dir) however this relies on the user having internet explorer configured properly and have an active internet connection. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now