/build/static/layout/Breadcrumb_cap_w.png

Disable Firefox Update - VBscript

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

Answers (2)

Posted by: Bruiser 12 years ago
Orange Belt
5
Have you tried this: http://kb.mozillazine.org/Locking_preferences
Seems a lot easyer...

Comments:
  • easier of course :| - Bruiser 12 years ago
  • Just put it in the mozilla.cfg file and copy it to "%PROGRAMFILES%\Mozilla Firefox" - andemats 12 years ago
Posted by: mahendraKumar 12 years ago
Senior Yellow Belt
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
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ