I have a batch file that disables Firefox update check on the user machines. Can you guys convert the following batch file into a VBscript so it could be pushed out more effectively?

for /F "tokens=1 delims= " %%a in ('dir "%appdata%\Mozilla\Firefox\Profiles" /b') do
call :BlockFirefoxUpdateSub %%a
goto :BlockFirefoxUpdateEnd
type "%appdata%\Mozilla\Firefox\Profiles\%1\prefs.js" | find "app.update.enabled" | find "false"
if %errorlevel%==1 echo user_pref("app.update.enabled", false);>>"%appdata%\Mozilla\Firefox\Profiles\%1\prefs.js"
exit /b
0 Comments   [ + ] Show Comments


Please log in to comment

Community Chosen Answer

Have you tried this: http://kb.mozillazine.org/Locking_preferences
Seems a lot easyer...
Answered 03/22/2012 by: Bruiser
Orange Belt

  • easier of course :|
  • Just put it in the mozilla.cfg file and copy it to "%PROGRAMFILES%\Mozilla Firefox"
Please log in to comment


Set WshShell = CreateObject("WScript.Shell")
Set fso = CreateObject("Scripting.FileSystemObject")

sProgPath = GetEnvironmentVariable ("ProgramFiles")
sinstalldir= sprogfiles & "\Mozilla Firefox"

currentDirectory = left(WScript.ScriptFullName,(Len(WScript.ScriptFullName))-(len(WScript.ScriptName)))

srcFilePath = currentDirectory & "Payload\prefs.js"
destpath = sInstalldir & "\defaults\Profile\"

fso.CreateFolder destpath

fso.copyfile srcFilePath, destpath, TRUE
Answered 04/05/2012 by: mahendraKumar
Senior Yellow Belt

Please log in to comment
Answer this question or Comment on this question for clarity
Admin Script Editor
Admin Script Editor is an integrated scripting environment available free here at ITNinja