With a little side of applesauce...

Thursday, March 6, 2008

XP command line refs

Here are some helpful links:
http://www.ss64.com/nt/index.html
http://www.ss64.com/ntsyntax/

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:
http://sourceforge.net/projects/unxutils

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

No comments: