With a little side of applesauce...

Thursday, March 6, 2008

XP command line refs

Here are some helpful links:

That helped me to write this:

for /f "delims=|" %G in ('dir /S /B ^"prefs.js^"') do sed "s/user_pref(\"browser.startup.homepage\", \"http.*\")\;/user_pref(\"browser.startup.homepage\", \"http:\/\/www.stolaf.edu\")/;" "%G"

to modify the home page value for firefox. (Esp. useful when there are multiple profiles on a box).

The sed.exe is taken from:

and placed in the directory in which you execute the command, (so that is in the PATH).

No comments: