Freetime Posted December 20, 2012 Posted December 20, 2012 (edited) Hi all I'm a newbie, I'm beginning to learn Autoit, and I love it In my idea of protect file by Autoit, I have DATA foder (E:DATA) and I don't want any body copy (or drag/drop) files in it to USB disk.How can I do it ???or... how can i listenning a source folder of copying process for close it ???Sorry for my bad English Edited December 22, 2012 by Freetime
Freetime Posted December 22, 2012 Author Posted December 22, 2012 While 1 Sleep(10) Local $copy = ClipGet(), $datafolder = "E:\DATA" $pr = StringInStr($copy, $datafolder) If $pr = 1 then ClipPut(" ") EndIf WEnd With this code, i can clear clipboard when they copy/paste, but... it not work if they drag/drop file ?
Kyan Posted December 22, 2012 Posted December 22, 2012 you can block folder access with a windows ACL Heroes, there is no such thing Reveal hidden contents One day I'll discover what IE.au3 has of special for so many users using it.C'mon there's InetRead and WinHTTP, way better
Newb Posted December 23, 2012 Posted December 23, 2012 On 12/22/2012 at 5:16 PM, 'Freetime said: While 1 Sleep(10) Local $copy = ClipGet(), $datafolder = "E:\DATA" $pr = StringInStr($copy, $datafolder) If $pr = 1 then ClipPut(" ") EndIf WEnd With this code, i can clear clipboard when they copy/paste, but... it not work if they drag/drop file ? Woa... nice trick... does it really work? Awesome I'm a compulsive poster. When I post something, come to read it at least 5 minutes later after the posting, because I will edit it. I edited even this signature a few minutes later after I wrote it.
Freetime Posted December 23, 2012 Author Posted December 23, 2012 On 12/22/2012 at 8:23 PM, 'DiOgO said: you can block folder access with a windows ACLAnd... what happen with other application need access to E:data ? On 12/23/2012 at 3:30 AM, 'Newb said: Woa... nice trick... does it really work?AwesomeYou can test if you want
johnmcloud Posted December 24, 2012 Posted December 24, 2012 (edited) More easy... _CheckPath() MsgBox(0, 0, "Yeah, work!") Func _CheckPath() If @ScriptDir <> "E:\Data" Then MsgBox(0, 0, "Hey, don't steal my script!") Exit EndIf EndFunc ;==>_CheckPath People can copy, drag-drop but work only in the path E:Data. For additional protection, you can check an HWID of a component of your pc, or simply check it out the computer name with @ComputerName using the same method of the @ScriptDir EDIT: I think i have misunderstood, you want to protect the folder, not the script. Use a password protected .zip, it's most safety. There is everytime a way to copy a folder, example with a live cd. Edited December 24, 2012 by johnmcloud
Freetime Posted December 25, 2012 Author Posted December 25, 2012 On 12/24/2012 at 10:47 AM, 'johnmcloud said: More easy... _CheckPath() MsgBox(0, 0, "Yeah, work!") Func _CheckPath() If @ScriptDir <> "E:\Data" Then MsgBox(0, 0, "Hey, don't steal my script!") Exit EndIf EndFunc ;==>_CheckPath People can copy, drag-drop but work only in the path E:Data. For additional protection, you can check an HWID of a component of your pc, or simply check it out the computer name with @ComputerName using the same method of the @ScriptDir EDIT: I think i have misunderstood, you want to protect the folder, not the script. Use a password protected .zip, it's most safety. There is everytime a way to copy a folder, example with a live cd. Thanks johnmcloud ! I need to protect folder from copy (to USB disk only), but user can read write and execute...
PhoenixXL Posted December 25, 2012 Posted December 25, 2012 (edited) Quote but user can read write and execute...The Idea of Zipping[Password Protected] is good. U could extract to read write and execute there is a Zip UDF in the Forum written by wraithdu Edited December 25, 2012 by PhoenixXL My code: Reveal hidden contents PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners. MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression.
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