Hyflex Posted January 27, 2014 Posted January 27, 2014 (edited) Hey,I used a Portable ThunderBird setup about a year ago, set it up with a bunch of pre-configured settings including logins for several accounts and made myself a little tool to re-configure based on what computer it is on.The code I originally had I can't work out how/what it was doing what it was doing... $SZFILE = @ScriptDir & "\ThunderbirdPortable\Data\settings\ThunderbirdPortableSettings.ini" $SZTEXT = FileRead($SZFILE, FileGetSize($SZFILE)) $SZTEXT = StringReplace($SZTEXT, "C:\Users\USERNAME\Downloads\DEFAULT FOLDER\", @ScriptDir & "\", 0, 1) FileDelete($SZFILE) FileWrite($SZFILE, $SZTEXT) $SZFILE = @ScriptDir & "\ThunderbirdPortable\Data\profile\compatibility.ini" $SZTEXT = FileRead($SZFILE, FileGetSize($SZFILE)) $SZTEXT = StringReplace($SZTEXT, "C:\Users\USERNAME\Downloads\DEFAULT FOLDER\", @ScriptDir & "\", 0, 1) FileDelete($SZFILE) FileWrite($SZFILE, $SZTEXT) $SZFILE = @ScriptDir & "\ThunderbirdPortable\Data\profile\extensions.ini" $SZTEXT = FileRead($SZFILE, FileGetSize($SZFILE)) $SZTEXT = StringReplace($SZTEXT, "C:\Users\USERNAME\Downloads\DEFAULT FOLDER\", @ScriptDir & "\", 0, 1) FileDelete($SZFILE) FileWrite($SZFILE, $SZTEXT) $SZFILE = @ScriptDir & "\ThunderbirdPortable\Data\profile\prefs.js" $SZTEXT = FileRead($SZFILE, FileGetSize($SZFILE)) $SZTEXT1 = StringRegExpReplace(@ScriptDir & "\", "\\", "\\\\") $SZTEXT = StringReplace($SZTEXT, "C:\\Users\\USERNAME\\Downloads\\DEFAULT FOLDER\\", $SZTEXT1, 0, 1) FileDelete($SZFILE) FileWrite($SZFILE, $SZTEXT) $SZFILE = @ScriptDir & "\ThunderbirdPortable\Data\profile\prefs.js" $SZTEXT = FileRead($SZFILE, FileGetSize($SZFILE)) $SZTEXT1 = StringRegExpReplace(@ScriptDir & "\", "\\", "\\\\\\\\") $SZTEXT = StringReplace($SZTEXT, "C:\\\\Users\\\\USERNAME\\\\Downloads\\\\DEFAULT FOLDER\\\\", $SZTEXT1, 0, 1) FileDelete($SZFILE) FileWrite($SZFILE, $SZTEXT)I just found out that I missed a bunch of files that need to have some changes made...File: \ThunderbirdPortable\Data\profile\panacea.dat Change: C:\\Users\\USERNAME\\Downloads\\DEFAULT FOLDER\\File: \ThunderbirdPortable\Data\profile\search.json Change: C:\\Users\\USERNAME\\Downloads\\DEFAULT FOLDER\\File: \ThunderbirdPortable\Data\profile\secmod.db Change: C:\\Users\\USERNAME\\DOWNLO~1\\File: \ThunderbirdPortable\Data\profile\startupCache\startupCache.4.little Change: C:/Users/USERNAME/Downloads/DEFAULT%20FOLDERl/File: \ThunderbirdPortable\Data\profile\pluginreg.dat Change: C:\Users\Anon\AppData\Roaming\ It needs to be updated to the new AppData folderBasically I installed thunderbird to the current folder:C:UsersUSERNAMEDownloadsDEFAULT FOLDERIt needs to be changed the scriptdir's folder with the appropriate formatting (startupcache.4.little for example has %20 for the space and some locations have a single slash, some have two, some three and some four...Any ideas how I am supposed to fix the changes above? Edited January 27, 2014 by Hyflex
Hyflex Posted February 2, 2014 Author Posted February 2, 2014 Bump, anyone able to help with these, I still haven't managed to work it out :S
Neutro Posted February 2, 2014 Posted February 2, 2014 Hey Hyflex, If you can't find out what your script was doing, I suggest you start a new one to do what you want to do! Identify active network connections and change DNS server - Easily export Windows network settings Clean temporary files from Windows users profiles directories - List Active Directory Groups members Export content of an Outlook mailbox to a PST file - File patch manager - IRC chat connect example Thanks again for your help Water!
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