MadCoder Posted September 4, 2013 Posted September 4, 2013 (edited) We have an SVN that I need to protect our code being copied to USB drives. I started the project in C# but ran in to a few problems along the way, and saw a few people have done this soft of thing in Autoit. I have a little experience in Autoit, and figure why not give it a try. Some of this I can handle through a shell process in C#. For example emailing the attachment, but if I can get it all done in one script, then that would be great. Here's my projects layout: - exe runs as a service and strictly monitors for USB thumb drives to be detected? - Once detected, checks against an array of file extensions (.cs,.py,.c,.asm,.lua, etc...) that are begin copied to drive<br> - logs files copied to thumb drive to a file - Emails the log as an attachment to me Is this doable in Autoit, or should I look for another alternatives? Edited September 4, 2013 by MadCoder
rudi Posted September 4, 2013 Posted September 4, 2013 (edited) Hi. Exe as a service? -> see FAQ just loop through your array, use filecopy() fileopen(), filewriteline(), fileclose(), filecopy() my personal suggestion: blat.exe, fileinstall(), runwait("blat.exe .....") regards, Rudi. Edited September 4, 2013 by rudi Earth is flat, pigs can fly, and Nuclear Power is SAFE!
abberration Posted September 4, 2013 Posted September 4, 2013 Some threads that may help you: Detect USB drive: Making a list of files: '?do=embed' frameborder='0' data-embedContent>> Email with attachment (I think it has trouble with Gmail): Functions that will also help: _ArraySearch and _FileWriteLog. Easy MP3 | Software Installer | Password Manager
orbs Posted September 4, 2013 Posted September 4, 2013 speaking as Advocatus Diaboli here, what stops your determined user from stopping the service? what stops him from connecting to your SVN from a pc that does not have your program installed on? i do hope you are requested to do that for regulatory purposes only, as practically, it is very hard to enforce, and a determined user will find the way to override it. i'm asking, because i did encounter the same requirement more than once, so i'm interested in your point of view. Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates WinPose - simultaneous fluent move and resize Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff Magic Math - a math puzzle Demos: Title Bar Menu - click the window title to pop-up a menu
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