3

Using AutoIt v3, I need to copy a file and have the resulting file (a .dll) be hidden.

I tried FileCopy & FileInstall orders but they just make the file visible and not hidden after execution.

Oliver Salzburg
  • 86,445
  • 63
  • 260
  • 306
YaZan
  • 63
  • 4

1 Answers1

5

Both FileCopy() and FileInstall() have no arguments to set file attributes (You can see this in the function reference).

You need to move/copy the file to the intended location and then set the file attributes. FileSetAttrib() serves just that purpose.

FileCopy("nefarious.dll", "/path/to/innocent_looking.dll")
FileSetAttrib("/path/to/innocent_looking.dll", "+H")
Tyler
  • 4,271
  • 21
  • 22
  • btw i used FileInstall()... Because in FileCopy() order...my AutoIt file needed to be with dll file or it will not copy & hide it even after compiling the script – YaZan Feb 23 '14 at 21:30