![]() To Start Firefox from CMD using your defined proxy settings Version="`firefox -v | awk '\AppData\Roaming\Mozilla\Firefox\Profiles\fault\ I change the IP to %1 so when you call the script from the command line you can give it an option instead of having to change the file. The only change I was able to make to the Windows scripts is above in the quoted part. If someone has the knowledge off the top of their head could they rewrite the Windows code to only add the lines if they're not already in there? I have no idead how to do sed/awk stuff in Windows without installing Cygwin first. Currently I've been trying to edit the actual Firefox defaults file. ![]() The about:config screen never showed my changes. First I tried in ~/.mozilla/firefox/*.default/prefs.js but it didn't load very well. I've been experimenting with which file to insert the prefs into. My Linux version is at the bottom of this post. My goal was to do this by learning to do it with Linux first and then learn the Windows shell which I was not happy about having to do so you saved me some time! I needed this exact piece of code for Windows. I'm sure there is a more efficient/safer way of doing this. ![]() The reason I added the rename and delete lines is because I couldn't find a way to overwrite the file once I had removed the proxy line. If it finds it, it deletes the file with the /v parameter. ![]() Then looks within it to find the line "user_pref("", 1) ". Type "?ile%\prefs.js" | findstr /v "user_pref("", 1) " >"?ile%\prefs_.js"Įxplanation: The code goes and finds the perfs.js file. If someone wants to remove the proxy settings, here is some code that will do that for you. Just wanted to post the code in a cleaner format.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |