Jump to content

Protect data from copy & drop drag file


Freetime
 Share

Recommended Posts

Hi all :P

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 :P

Edited by Freetime
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 by johnmcloud
Link to comment
Share on other sites

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...
Link to comment
Share on other sites

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 by PhoenixXL

My code:

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.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...