use command line switch when browser opened via association?

MilesAhead

Eclectician
Guru
Gold Member
Local time
8:23 PM
Messages
5,063
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

Computer Manufacturer/Model Number
HP Media Center
OS
Windows 7 32 bit
CPU
AMD 5200+ dual core
Memory
2 GB
Graphics Card(s)
NVidia GeForce 6150SE 128 MB
Monitor(s) Displays
CRT
Screen Resolution
1280x1024
Hard Drives
500 GB Sata internal :

SIIG USB 3.0 docking stations w/WD Caviar Black 6 Gb/s drives
Keyboard
PS/2
Mouse
PS/2 Wheel Mouse
Other Info
SIIG USB 3.0 PCIexpress card.
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

Computer Manufacturer/Model Number
HP Media Center
OS
Windows 7 32 bit
CPU
AMD 5200+ dual core
Memory
2 GB
Graphics Card(s)
NVidia GeForce 6150SE 128 MB
Monitor(s) Displays
CRT
Screen Resolution
1280x1024
Hard Drives
500 GB Sata internal :

SIIG USB 3.0 docking stations w/WD Caviar Black 6 Gb/s drives
Keyboard
PS/2
Mouse
PS/2 Wheel Mouse
Other Info
SIIG USB 3.0 PCIexpress card.
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

Computer Manufacturer/Model Number
HP Media Center
OS
Windows 7 32 bit
CPU
AMD 5200+ dual core
Memory
2 GB
Graphics Card(s)
NVidia GeForce 6150SE 128 MB
Monitor(s) Displays
CRT
Screen Resolution
1280x1024
Hard Drives
500 GB Sata internal :

SIIG USB 3.0 docking stations w/WD Caviar Black 6 Gb/s drives
Keyboard
PS/2
Mouse
PS/2 Wheel Mouse
Other Info
SIIG USB 3.0 PCIexpress card.
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

Computer Manufacturer/Model Number
HP Media Center
OS
Windows 7 32 bit
CPU
AMD 5200+ dual core
Memory
2 GB
Graphics Card(s)
NVidia GeForce 6150SE 128 MB
Monitor(s) Displays
CRT
Screen Resolution
1280x1024
Hard Drives
500 GB Sata internal :

SIIG USB 3.0 docking stations w/WD Caviar Black 6 Gb/s drives
Keyboard
PS/2
Mouse
PS/2 Wheel Mouse
Other Info
SIIG USB 3.0 PCIexpress card.
Back
Top