Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

up vote 5 down vote accepted

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")
share|improve this answer
    
I <3 you man...it works...all thanks :D :)) –  YaZan Feb 23 at 20:44
    
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 at 21:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.