1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved: Batch file to turn off Macromedia Flash Player?

Discussion in 'Web & Email' started by pouj, Aug 7, 2006.

Thread Status:
Not open for further replies.
Advertisement
  1. pouj

    pouj Thread Starter

    Joined:
    Jul 9, 2006
    Messages:
    16
    I recently downloaded the Adobe Macromedia flash player v. 9.0.16 in order to play content from newspaper sites and blogs. In addition, unfortunately, it also activates the streaming content from sites where I don't want it because it distracts me unnecessarily.

    After a search of the web and trying out (unsuccessfully) a couple of programs that promised to turn the flash player on/off, it seems that the best solution would be to write a batch file to turn off the program. At one web site, I found a batch command to run a program, but none to stop a program.

    Does anyone know of such a batch file? Is this approach the best way to deal with the incessant flash content? Any ideas would be appreciated.

    Thanks for taking the time to read this.

    Pouj :confused:


    Computer:
    eMachines, Inc.
    System Model: Imperial
    BIOS Version: Phoenix 6.00

    Operating System
    Microsoft Windows XP Home Edition
    Version: 5.1.2600
    Service Pack: 1.0
    Location: C:\WINDOWS
    PID: 55277-OEM-0011903-00103
    Hot Fix: KB917953

    Capacity: 256 MB

    Intel(R) Celeron(R) CPU 2.60GHz
    Version: x86 Family 15 Model 2 Stepping 9
    Speed: 2586 MHz

    Local Disk
    Total Capacity: 76.33 GB
    Used: 8.54 GB
    Free: 67.78 GB

    Mozilla Firefox 1.5.06
     
  2. pouj

    pouj Thread Starter

    Joined:
    Jul 9, 2006
    Messages:
    16
    Bump
     
  3. Shadow2531

    Shadow2531

    Joined:
    Apr 30, 2001
    Messages:
    2,636
    npswf32.dll provides flash. It can be found in many different directories and the program you're using may scan other directories to find npswf32.dll. That means, if it's not in the the program's directory, the program still might find it somewhere else.

    Assuming, you're talking about Firefox and the only npswf32.dll it finds is in the Firefox plugins directory and you have Admin access, this should give you an idea:

    flashoff.bat
    Code:
    cd "%programfiles%\Mozilla Firefox\plugins"
    rename npswf32.dll npswf32.off
    
    flashon.bat
    Code:
    cd "%programfiles%\Mozilla Firefox\plugins"
    rename npswf32.off npswf32.dll
    
    (I'm not on windows, so can't test that to make sure.)

    You might have to restart firefox for it to recognize the change though. There's probably an extension for this. Also, Opera allows per-site preferences, so you can turn off plug-ins for a certain site or kill flash with css for a certain site. You can do this with user javascript in Opera too. In Firefox, you can also use user.css and greasemonkey for user scripts.
     
  4. pouj

    pouj Thread Starter

    Joined:
    Jul 9, 2006
    Messages:
    16
    Thanks for the help. I'm going to track down exactly where in my computer npsf.dll lurks and will get back to you on that. I used to run Opera and Eudora, but switched to Firefox when I had problems. Also will look up greasemonkey and user.css to learn about user scripts.

    Will reply again after I've collected the information, so that I use up as little of your time as possible.

    pouj
     
  5. pouj

    pouj Thread Starter

    Joined:
    Jul 9, 2006
    Messages:
    16
    Shadow2531, you're a genius!!!

    Greasemonkey, the King Kong of my computer dreams, is a miracle worker. At userscripts.org there was a flash blocker script, which disables web site animations shortly after they appear on the screen. Then to get them to play again, you have to click on an enabling bar at the top of the web site. (By the way, FYI, on my machine the file is named npswf32.dll.)

    For me the flash content was a major distraction and annoyance. Your kind advice makes my daily life happier, a 10 banana triumph for you. I can't thank you enough.

    pouj
     
  6. hewee

    hewee

    Joined:
    Oct 26, 2001
    Messages:
    57,791
    That is the same plugin for netscape that firefox uses.

    With netscape if I turned the flash on or off with the batch file I would have to clear the cache and shut down netscape and go back to see the change take effect.
    With firefox it seems to work better and most times but not always I can just clear the cache.

    Note:
    Do a search on npswf32.dll because it is a plugin and should be in firefox plugin folder but if the same file is anyplace else on you computer the flash will find it and use it even if you got the one disabled with the batch file.
    On this drive I am on now I never had flash but got the batch file from my other drive and knew just what to do and I had disabled the flash but I was still seeing the flash.
    I looked in the plugin folder and seen it was renamed npswf32.off so did a search for npswf32.dll and found I had a C:\WINDOWS\SYSTEM\Macromedia folder with the same file in it so I justed rename the file NPSWF32.dll.old

    I have just one batch file like this here.
    Code:
    @echo off
    if exist "C:\Program Files\Mozilla Firefox\plugins\npswf32.dll" goto disable
    if exist "C:\Program Files\Mozilla Firefox\plugins\npswf32.dll.off" goto enable
    echo Couldn't find a flash plugin.
    echo.
    goto usage
    
    :disable
    ren "C:\Program Files\Mozilla Firefox\plugins\npswf32.dll" "npswf32.dll.off"
    
    echo Flash Disabled.
    goto done
    
    :enable
    ren "C:\Program Files\Mozilla Firefox\plugins\npswf32.dll.off" "npswf32.dll"
    
    echo Flash Enabled.
    goto done
    
    :usage
    echo You must specify the path to your browser's plugins directory.
    echo Put the path in double quotes if it includes spaces.
    echo For example, toggleflash.bat "c:\Program Files\Netscape\Netscape\plugins"
    
    :done
     
  7. LuckyStrike

    LuckyStrike

    Joined:
    Nov 2, 2004
    Messages:
    2,141
    I learned something new today. I have long used the Toggleflash.bat file on my Win98SE machine to toggle flash on and off in FireFox. Today I set up my new computer with Windows XP. I edited the very same text file that Hewee posted to reflect the different locations for the npswf32.dll file in my new XP machine. When I attempted to rename the text file with a .bat extension the file type would not change. It merely renamed the text file to Toggleflash.bat.txt. After much experimentation I found that if I unchecked "Hide extensions for known file types" under the "view" tab in folder options I was then able to successfully change the file type.

    On my WinXP sp2 machine with FireFox 3.0 and flash 9.0.124.0 the following batch file works successfully to toggle flash on and off:

     
  8. hewee

    hewee

    Joined:
    Oct 26, 2001
    Messages:
    57,791
    Good you got the batch file to work again.

    I stop using mine after NoScript added the Flash to the pluging tab.
    It is better in a way too because if you want flash at a web site you click on the flash and get a pop up to give it the OK. Nice thing is if the page has flash all over it you will not have to load all of them because you pick what one you want.
    I really only need the flash at youtube and some game sites and it is nice not seeing all the other flash on the page. Plus on some games if you right click the flash place holder before you load the flash and click open in new window and then load the flash it will load it in a bigger window because it breaks out of the frame. No all will be bigger but most will. Some will not play because it is missing what ever was on the web page but again most will. The maker of NoScript did not even know about it till I told him and he even did a write up about it saying I found a hack in using NoScript.

    So seeing how your using firefox now I am guess your using NoScript too so go to the NoScript options and plugins tab. On the boxes checked from top to bottom with top being one I have a check mark in 1, 2, 3, 4, 6, 7, 8, 9.
     
  9. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Similar Threads - Solved Batch file
  1. bgasik88
    Replies:
    0
    Views:
    154
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/490291

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice