Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: use command line switch when browser opened via association?

23 Nov 2011   #1
MilesAhead

Windows 7 32 bit
 
 
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 System SpecsSystem Spec
.
23 Nov 2011   #2
MilesAhead

Windows 7 32 bit
 
 

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 System SpecsSystem Spec
23 Nov 2011   #3
MilesAhead

Windows 7 32 bit
 
 

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 System SpecsSystem Spec
.

23 Nov 2011   #4
MilesAhead

Windows 7 32 bit
 
 

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 System SpecsSystem Spec
Reply

 use command line switch when browser opened via association?




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
Command Line - Help
Hi Guy's and Girls, Just first off I've never been too good with CMD and only an Apprentice in my company I work for. Now something I've wanted to do for awhile was to make the following but I don't necassirealy I know how to do this in one batch file: I would need a Batch file that is...
General Discussion
How do I Close an opened folder in Run or at the Command prompt
I have an application that opens a folder using a shell to Explorer. I can close Most apps I shell using Taskkill but not the opened folder. I have tried Openfiles with no luck ( I think it is for networks). I need this to tidy up an application. Thank you.
General Discussion
When Excel files can be opened in browser?
In open dialog box (of an Excel 2010 file) in path File > open, there is a drop-down list for Open button. One of them is, open in browser. When Excel files can be opened in browser (Web browser, e.g., Chrome) please?
Microsoft Office
Windows 7 SP1 Can Crash If Command Prompt Is Opened and Closed
Windows 7 SP1 Can Crash If Command Prompt Is Opened and Closed Repeatedly Windows 7 SP1 Can Crash If Command Prompt Is Opened and Closed Repeatedly - Softpedia
Windows Updates & Activation
libraries and the command line
I am a long time programmer and computer science professor, since 1979. I grew up with the command line and like it just fine. But Windows 7 seems to change the GUI way of doing things and not mess with the command line. Yesterday I was at the command prompt and went to C:\users\Stockwell and...
Performance & Maintenance
Command Line
Is there a cmd.exe /switch for “run as administrator” ? Thanks-
General Discussion


Our Sites

Site Links

About Us

Find 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 15:32.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App