[Go to Google Groups Home] Advanced Groups Search Groups Help Groups Viewing message From: A Malfunction (task@hand.invalid) Subject: Remove the EULA before installing your software Newsgroups: alt.privacy, alt.windows98 Date: 2002-04-30 View: Complete Thread (2 articles) | Original Format 15:00:29 PST This is a Windows VBScript I created to remove the click-through End-User License Agreements from retail software I install. EULAs are getting unacceptably intrusive and restrictive, and I for one have had enough. In my opinion, manufacturers have no business putting extra restrictions on how I use something after I have already paid for it. While this script is no great programming achievement, its purpose is twofold: (1) to make a point about the absurdity of hidden "agreements" that buyers cannot know about until after sale, and (2) to be able to honestly say that I never accepted any EULA, and thus my use of the software is limited only by copyright law, just like a book or a CD. Copy the following into a file called NoMoreEULA.vbs, further instructions are in the comments at the top: ' NoMoreEULA.vbs - Automatic EULA remover for Windows ' $Revision: 1.11 $ ' $Date: 2002/04/29 16:32:17 $ ' ***************************************************************************** ' Windows VBScript for automatically removing the click-through End-User ' License Agreements found in most installers. Use this to install your ' paid-for software without accepting outrageous post-sale terms of use from ' the manufacturer. For extra amusement, you may add your own "Software Vendor ' License Agreement" to replace the EULA by providing a file SVLA.txt in the ' same directory as this script. Take a look at ' for inspiration. ' I AM NOT A LAWYER AND THE FOLLOWING IS MERELY OPINION, NOT LEGAL ADVICE: ' To use this, start your software's installer as you normally would, but ' before it displays the EULA, run this script (double-click the file or run ' "wscript.exe NoMoreEULA.vbs"). It will search the Windows Temp directory for ' text files that could be EULAs and give you a chance to replace them. In my ' brief testing, this works with most installers. If all goes well, the ' installer will display an empty agreement (or your SVLA.txt) instead of the ' manufacturer's. You may want to take a screen shot of that window (Alt-Print ' Screen, then Paste into MSPaint or something similar) to show that you never ' agreed to the original EULA. Naturally, you must still obey copyright laws ' (i.e. no unauthorized distribution) while using the software. ' I created this script in an effort to show just how absurd it is to have to ' accept arbitrary terms of use from the manufacturer _after_ you have paid for ' something. My opinion is that EULAs on store-bought software are completely ' unenforceable. Software manufacturers give the appearance of a sale (you buy ' it in a standard retail store, you pay sales tax, etc.), but after they ' have your money they spring this "agreement" on you and suddenly it's a ' lease. Ladies and gentlemen, this is known as _fraud_. If a transaction ' looks like a sale, then it _is_ a sale, and it's up to the party who doesn't ' want it to be a sale to make that known in advance. The burden is on the ' manufacturer not on me. It is not my responsibility to seek out these extra ' terms of use, nor is "return this software for a full refund" an acceptable ' remedy for this contractual Trojan Horse. ' For no other type of product would we consumers tolerate this nonsense--not ' even other copyrighted works like books or CDs. When you buy something it's ' yours and only the _law_ can restrict how you use it, not the manufacturer. ' Copyright gives authors the power to prevent others from publishing their ' work, but it is not a blanket license for them to dictate how people use it. ' However, courts have been slow to apply the First Sale doctrine to software, ' and I am impatient. By running this script you sidestep the issue entirely. ' You can honestly claim that you never agreed to any EULA, and thus are bound ' only by the terms of copyright law. Copying the software to your hard disk, ' memory, and CPU in order to run it is already permitted under Fair Use, ' specifically by 17 USC 117(a); so using the software on your own computer ' after you've legitimately paid for it does not require anyone's permission. ' Absent interference from the EULA, you remain free to reverse engineer, ' disassemble, and back up your private property as the law allows and only ' distribution of the copyrighted software is illegal. Again though, I am not ' a lawyer, and this is not legal advice. ' There is some chance that this code is in violation of 17 USC 1201(a)(2) (the ' "Digital Millennium Copyright Act"), but oh well... One more reason to write ' to your Congressmen and get that stupid law repealed. A web search on DMCA, ' CBDTPA, or UCITA will get you started if you are unfamiliar with the legal ' and Constitutional issues here. ' PLEASE NOTE THAT THIS IS IN NO WAY A LICENSE TO COPY AND DISTRIBUTE (i.e. ' "PIRATE") SOFTWARE ILLEGALLY. THIS SCRIPT IS INTENDED ONLY TO FREE YOU FROM ' RESTRICTIONS ABOVE AND BEYOND WHAT THE LAW ALREADY PROHIBITS; IT DOES NOT ' (AND CANNOT) GIVE YOU PERMISSION TO VIOLATE COPYRIGHT LAW. I DO NOT CONDONE ' COPYING COMMERCIAL SOFTWARE WITHOUT PAYING FOR IT, IF FOR NO OTHER REASON ' THAN SUCH BEHAVIOR IS PRECISELY WHAT GIVES US CRAZY, UNCONSTITUTIONAL LAWS ' LIKE THE DMCA IN THE FIRST PLACE. ' Feel free to distribute this code as widely as possible, but please preserve ' this comment section at the top. Also feel free to make and distribute ' improvements as this is my first attempt at using VBScript. I have tested ' this on Windows 98, but it should work on any version of Windows with ' Scripting Host installed. Visit if you need WSH. ' What would better is a script to remove the read-only property of a Windows ' text field (or modify its contents) at run-time, but I don't know if VBScript ' allows one app to modify another like that. ' ***************************************************************************** ' Require all variables to be declared before use. Option Explicit ' Win32 Constants Const ForReading = 1 Const ForWriting = 2 Const TemporaryFolder = 2 ' Script Constants Const EULASize = 65536 ' Max size of an EULA candidate Const SVLAFile = "SVLA.txt" ' Optional file containing replacement EULA text ' Objects Dim fso Dim fd Dim tmp ' Strings Dim svla ' Integers Dim numeula ' Regexes Dim highchar Dim nonchar Dim term1 Dim term2 ' Return True if the given string looks like an EULA. Function iseula(s) ' Is it mostly (> 98%) ASCII text? We don't want to overwrite a binary file. If highchar.Execute(s).Count > 0.02 * Len(s) Then iseula = False Exit Function End If ' Does it contain telltale terms like "license agreement"? If term1.Execute(s).Count = 0 Then iseula = False Exit Function End If ' How about "reverse engineer", etc.? If term2.Execute(s).Count = 0 Then iseula = False Exit Function End If ' Is the number of printable, non-newline characters at least 90% of the ' total? This helps distinguish EULAs, which tend to be wordy, from other ' text like config files that might also happen to contain EULA words. If nonchar.Execute(s).Count > 0.1 * Len(s) Then iseula = False Exit Function End If ' Ok, it's an EULA. iseula = True End Function ' Walk through subdirectories checking each file to see if it's an EULA. Sub recurse(folder) Dim subfolder Dim file Dim fd Dim l ' Traverse subdirectories. For Each subfolder In folder.SubFolders recurse(subfolder) Next For Each file In folder.Files If file.Size < EULASize Then ' Try to open each file. Some will fail if they are in use, but that's ' ok, just skip them. On Error Resume Next Set fd = fso.OpenTextFile(file, ForReading) If Err.Number = 0 Then l = fd.ReadAll fd.Close Set fd = Nothing If iseula(l) Then ' We found a match. Show the first part of the file contents and the ' filename and ask the user for confirmation. If MsgBox("Defuse " & file & "?" & vbCrLf & vbCrLf & vbCrLf & _ Left(l, 1024), vbYesNo, "Possible EULA found") = vbYes Then ' Overwrite the entire file with our own. Set fd = fso.CreateTextFile(file, True) fd.Write svla fd.Close Set fd = Nothing numeula = numeula + 1 End If End If End If End If Next End Sub ' ***************************************************************************** ' Main ************************************************************************ ' ***************************************************************************** Set fso = WScript.CreateObject("Scripting.FileSystemObject") Set tmp = fso.GetSpecialFolder(TemporaryFolder) ' If SVLA.txt exists in the same directory as the script, use that. Otherwise ' use a default blank agreement. If fso.FileExists(SVLAFile) Then Set fd = fso.OpenTextFile(SVLAFile, ForReading) svla = fd.ReadAll fd.Close Set fd = Nothing Else ' Default agreement is nothing. svla = "The agreement is empty." & vbCrLf End If ' Regex for matching non-ASCII bytes Set highchar = New RegExp highchar.Pattern = "[\x80-\xff]" highchar.Global = True highchar.IgnoreCase = False ' Regex for matching letters and common punctuation. Set nonchar = New RegExp nonchar.Pattern = "[^a-z .,()\-=]" nonchar.Global = True nonchar.IgnoreCase = True ' First regex for matching common EULA terms. We insist on at least one match ' in each group to increase accuracy. Set term1 = New RegExp term1.Pattern = "(license\s*agreement|eula|terms\s*and\s*conditions|limited\s*license|limited\s*warranty)" term1.Global = True term1.IgnoreCase = True ' Second regex for matching common EULA terms. We insist on at least one match ' in each group to increase accuracy. Set term2 = New RegExp term1.Pattern = "(reverse-?\s*engineer|dis-?assemble|de-?compile|as-?\s*is)" term1.Global = True term1.IgnoreCase = True ' Search starting at C:\Windows\TEMP (or wherever). numeula = 0 recurse(tmp) ' If nothing was found, say so. If numeula = 0 Then MsgBox "No End-User License Agreements found in " & vbCrLf & tmp & ".", _ vbOkOnly, "No EULAs found" End If Post a follow-up to this message --------------------------------------------------------------------------- Google Home - Advertise with Us - Search Solutions - News and Resources - Language Tools - Jobs, Press, Cool Stuff... ©2002 Google