use command line switch when browser opened via association?


  1. Posts : 5,092
    Windows 7 32 bit
       #1

    use command line switch when browser opened via association?


    Seems like in Windows Seven there's no way to add a command line switch when setting up default programs?

    What I'm trying to do is ensure that Chromium is always opened with this command line switch: -allow-outdated-plugins

    I have it in the shortcut pinned to taskbar. All is fine until I open a page via association when the browser isn't open. Chromium has Flash built in. I have it disabled. So without the switch I'm going to keep seeing "your plugin is outdated" blah blah.

    I don't understand why command line params when setting up file types has been removed.
      My Computer


  2. Posts : 5,092
    Windows 7 32 bit
    Thread Starter
       #2

    hmmmmm, this seems to be working. I went to HKCR key for .html and got the value. Searched on that to get the command string. It was
    "c:\path\Chromium\chrome.exe" -- "%1"

    I changed it to
    "c:\path\Chromium\chrome.exe" " --allow-outdated-plugins " "%1"

    Note the empty space at the start and end of the allow param.
    If you just stick the allow part after a space after the exe it won't work. It needs these 3 quoted groupings. At least by trial and error it works for me.

    (Use ERUNT or restore point to back up registry before these edits in case browsing gets broken from messing with it.)
      My Computer


  3. Posts : 5,092
    Windows 7 32 bit
    Thread Starter
       #3

    Trouble with Registry edit, switch to a different browser as default, then switch back to Chromium, and it will overwrite your edit with it's default string. I asked on chromium-discussed if there's any fix.

    In the meantime I wrote a tiny AutoIt3 program program I can run from the command line instead of opening Regedit every time I switch back to chromium as default.

    On your machine it should say your user name instead of "Owner" so check your Registry key
    and make the appropriate edit if you want to use this script.

    Code:
    AutoItSetOption("TrayIconHide", 1)
    $regKey = "HKEY_CLASSES_ROOT\ChromiumHTML.Owner\shell\open\command"
    $regString = '"C:\Utils\Chromium\chrome.exe" " --allow-outdated-plugins " "%1"'
    ;MsgBox(0x1040,"",$regString)
    If RegWrite($regKey, "", "REG_SZ", $regString) Then
    	MsgBox(0x1040, "", "Chromium Registry String Successfully Set")
    Else
    	MsgBox(0x1010, "", "Error Setting Chromium Registry String!")
    EndIf
      My Computer


  4. Posts : 5,092
    Windows 7 32 bit
    Thread Starter
       #4

    Ok, I found out what was happening. Chromium has built in flash. Firefox, that I also use, uses the downloaded plugin. The FF plugin needed to be updated. Go figure. Once I did that, then I could disable flash in Chromium and use the default registry string chromium inserts. No need for the script above except as a stop gap until you can update any other flash plugins on your system.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 23:12.
Find Us