/bundles/itninjaweb/img/Breadcrumb_cap_w.png
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?

:BlockFirefoxUpdate
for /F "tokens=1 delims= " %%a in ('dir "%appdata%\Mozilla\Firefox\Profiles" /b') do
call :BlockFirefoxUpdateSub %%a
goto :BlockFirefoxUpdateEnd
:BlockFirefoxUpdateSub
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
:BlockFirefoxUpdateEnd
0 Comments   [ + ] Show comments

Comments


Community Chosen Answer


Answers

5
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"

Answers

1
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

Share