You are here

Supermium - AdditionalParameters are getting in the way

16 posts / 0 new
Last post
AbsolutelyRandom
Offline
Last seen: 1 day 19 hours ago
Joined: 2019-03-22 09:18
Supermium - AdditionalParameters are getting in the way

I have created a simple registry file with entries to make Supermium Portable my default browser in Windows. The regular Make Supermium the default browser button doesn't work properly, ruins portability and makes enormous mess in OS/registry. I have been using the registry file since Google Chrome Portable 109 where it works flawlessly. However, there is an issue with launching a browser-associated file (like .html) in Supermium. Whenever I double-click on such an associated file it opens Supermium with the AdditionalParameters at the end of the file path. So, If I open a file that is stored at C:\SupermiumPortable\help.html then it gets opened as C:\SupermiumPortable\help.html--lang=en_US because this is the additional parameter I defined in SupermiumPortable.ini and it gets added to the launch path with every launch of the browser. As a result, the file doesn't get opened (file not found) as the path is incorrect. Any idea what's going on? Have there been any changes to the portable wrapper (SupermiumPortable.exe) since Google Chrome 109? I am unable to test it with the latest Google Chrome as I still use Windows 7 x64 and 109 is the last version that is supported by my OS.

This is a part of the registry file I created which is responsible for launching browser-associated files directly. The shell\open\command entry is crucial in this case.
[HKEY_CLASSES_ROOT\SupermiumHTM]
@="Supermium HTML Document"
[HKEY_CLASSES_ROOT\SupermiumHTM\DefaultIcon]
@="C:\\PortableApps\\SupermiumPortable\\SupermiumPortable.exe,0"
[HKEY_CLASSES_ROOT\SupermiumHTM\shell\open\command]
@="\"C:\\PortableApps\\SupermiumPortable\\SupermiumPortable.exe\" --single-argument %1"

And this is SupermiumPortable.ini.
[SupermiumPortable]
AdditionalParameters=--lang=en_US

John T. Haller
John T. Haller's picture
Offline
Last seen: 2 hours 23 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Add a Space

You can add a space to the AdditionalParameters line to fix this.

AdditionalParameters= --lang=en_US

May work. If not, this should:

AdditionalParameters=" --lang=en_US"

Supermium's launcher shares nothing with the Google Chrome launcher

Sometimes, the impossible can become possible, if you're awesome!

AbsolutelyRandom
Offline
Last seen: 1 day 19 hours ago
Joined: 2019-03-22 09:18
Unfortunately, none of them

Unfortunately, none of them work. Here is how the address bar looks like when launching help.html file from SupermiumPortable directory with your suggested AdditionalParameters:
file:///C:/PortableApps/SupermiumPortable/help.html%20"%20--lang=en_US"
https://i.imgur.com/1EIZIKS.png

It seems that the parameter is somehow incorrectly passed to the shell command in registry. No idea what has been changed in the launching procedure. The same registry trick works fine with Google Chrome 109.

John T. Haller
John T. Haller's picture
Offline
Last seen: 2 hours 23 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Totally Different

As mentioned, Supermium is a totally different launcher. It uses the PA.c Launcher.

Sometimes, the impossible can become possible, if you're awesome!

AbsolutelyRandom
Offline
Last seen: 1 day 19 hours ago
Joined: 2019-03-22 09:18
And what launcher does Google

And what launcher does Google Chrome Portable 109 use? From what I can see in GoogleChromePortableLegacyWin764 it basically has the same structure. That's why I have been asking if there have been any changes to the wrapper since 109 that would explain why launching the registry associated files doesn't work with Supermium (which is basically as fork of Google Chrome) as it does with the older Google Chrome release.

John T. Haller
John T. Haller's picture
Offline
Last seen: 2 hours 23 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Totally Separate

The old Google Chrome launcher is a custom one held together with duct tape that has a ton of stuff in it that doesn't work (passwords, etc). It's a totally different app. You can't substitute one for the other without altering app directories and such. It's not supported. Feel free to try it though.

Sometimes, the impossible can become possible, if you're awesome!

AbsolutelyRandom
Offline
Last seen: 1 day 19 hours ago
Joined: 2019-03-22 09:18
Do you mean that the PA

Do you mean that the PA launcher in Supermium Portable is a completely different one from the one used by Google Chrome Portable?

John T. Haller
John T. Haller's picture
Offline
Last seen: 2 hours 23 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Different

Again, they are totally different. Google Chrome Portable does NOT use the PA.c Launcher. It uses an old custom NSIS launcher. Supermium uses the PA.c Launcher. They're not interchangeable. They share no code.

Sometimes, the impossible can become possible, if you're awesome!

AbsolutelyRandom
Offline
Last seen: 1 day 19 hours ago
Joined: 2019-03-22 09:18
Oh, thanks for clearing that

For anyone interested in this topic, I share my
make_SupermiumPortable_default-browser.reg

Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\SupermiumHTM]
@="Supermium HTML Document"
[HKEY_CLASSES_ROOT\SupermiumHTM\DefaultIcon]
@="C:\\PortableApps\\SupermiumPortable\\SupermiumPortable.exe,0"
[HKEY_CLASSES_ROOT\SupermiumHTM\shell\open\command]
@="\"C:\\PortableApps\\SupermiumPortable\\SupermiumPortable.exe\" "--single-argument %1""

[HKEY_CLASSES_ROOT\SupermiumPDF]
@="Supermium PDF Document"
[HKEY_CLASSES_ROOT\SupermiumPDF\DefaultIcon]
@="C:\\PortableApps\\SupermiumPortable\\SupermiumPortable.exe,0"
[HKEY_CLASSES_ROOT\SupermiumPDF\shell\open\command]
@="\"C:\\PortableApps\\SupermiumPortable\\SupermiumPortable.exe\" "--single-argument %1""

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\SupermiumHTM]
@="Supermium HTML Document"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\SupermiumHTM\DefaultIcon]
@="C:\\PortableApps\\SupermiumPortable\\SupermiumPortable.exe,0"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\SupermiumHTM\shell\open\command]
@="\"C:\\PortableApps\\SupermiumPortable\\SupermiumPortable.exe\" "--single-argument %1""

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\SupermiumPDF]
@="Supermium PDF Document"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\SupermiumPDF\DefaultIcon]
@="C:\\PortableApps\\SupermiumPortable\\SupermiumPortable.exe,0"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\SupermiumPDF\shell\open\command]
@="\"C:\\PortableApps\\SupermiumPortable\\SupermiumPortable.exe\" "--single-argument %1""

[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\Supermium\Capabilities]
"ApplicationDescription"="Supermium is a web browser that runs webpages and applications with lightning speed. It's fast, stable, and easy to use. Browse the web more safely with malware and phishing protection built into Supermium."
"ApplicationIcon"="C:\\PortableApps\\SupermiumPortable\\SupermiumPortable.exe,0"
"ApplicationName"="Supermium Portable"
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\Supermium\Capabilities\FileAssociations]
".htm"="SupermiumHTM"
".html"="SupermiumHTM"
".pdf"="SupermiumPDF"
".shtml"="SupermiumHTM"
".svg"="SupermiumHTM"
".xht"="SupermiumHTM"
".xhtml"="SupermiumHTM"
".webp"="SupermiumHTM"
".url"="SupermiumHTM"
".website"="SupermiumHTM"
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\Supermium\Capabilities\Startmenu]
"StartMenuInternet"="Supermium"
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\Supermium\Capabilities\URLAssociations]
"ftp"="SupermiumHTM"
"http"="SupermiumHTM"
"https"="SupermiumHTM"
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\Supermium\DefaultIcon]
@="C:\\PortableApps\\SupermiumPortable\\SupermiumPortable.exe,0"
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\Supermium\shell\open\command]
@="\"C:\\PortableApps\\SupermiumPortable\\SupermiumPortable.exe\""

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\chrome.exe]
@="C:\\PortableApps\\SupermiumPortable\\SupermiumPortable.exe"
"Path"="C:\\PortableApps\\SupermiumPortable"

[HKEY_LOCAL_MACHINE\SOFTWARE\RegisteredApplications]
"Supermium"="SOFTWARE\\Clients\\StartMenuInternet\\Supermium\\Capabilities"

MiK
Offline
Last seen: 19 hours 5 min ago
Joined: 2008-08-14 18:25
Noticed a no-no here!

After my last reply, and later scrolling through this thread, I've noticed that you've had edited this post, silently, without announcing the code revision, thus making references in my original post incorrect.

So, now, I need to make this, instead of you.

Here is what you've had edited:

Removed text:

Oh, thanks for clearing that up! At the first sight both look very similar in file structure.
Anyway, if you ever come across any idea how to make Supremium Portable as default browser (without the issue with AdditionalParameters) then please let me know. There may be more users in here that would like to have such an option.

Changed code, from to - four instances:

@="\"C:\\PortableApps\\SupermiumPortable\\SupermiumPortable.exe\" --single-argument %1"

@="\"C:\\PortableApps\\SupermiumPortable\\SupermiumPortable.exe\" "--single-argument %1""

MiK
Offline
Last seen: 19 hours 5 min ago
Joined: 2008-08-14 18:25
What happens if there is no additional parameter in the way?

"Supermium - AdditionalParameters are getting in the way
... because this is the additional parameter I defined in SupermiumPortable.ini and
... Any idea what's going on?
"

I have some idea what the problem might be, but also need to ask a question for clarification, that is, what happens if you don't add that parameter, or any other, in the SupermiumPortable.ini, do then your registry modifications work as expected?

If they do not, then the solution might be as simple as enclosing the %1 flags, in the command lines, with double quotes, like this "%1", and with proper escaping and such as needed.

This just stood out for me in your examples, as some years ago I experienced an issue with Notepad++, portable version from the publisher, when my file associations stopped working, due to changes in the app. I just needed to change the format like you are using now to new with surrounding double quotes, and it worked again.

To illustrate this command line format, here's a real example from my system, how Comodo Firewall has registered one of its executables:

"C:\Program Files\COMODO\COMODO Internet Security\cfpconfg.exe" --comodoUri "%1"

Further, if you haven't already, you may want to check out a similar to yours issue on the Github repo:
https://github.com/win32ss/supermium/issues/1165

Titled: Unable to set default browser #1165

And, the OP there provides his/her examples of registry modifications to be used by the nonsetup.zip version of the program.

~

AbsolutelyRandom
Offline
Last seen: 1 day 19 hours ago
Joined: 2019-03-22 09:18
Thank you for your

Thank you for your suggestions. I have already tried to enclose the %1 flags with "" and \"%1\". However, none of them work.
If AdditionalParameters is not defined (or is empty) everything works fine so it definitely IS an issue with the %1 parameter and the way the PortableApps launcher OR Supermium handles it. The same configuration works fine with Google Chrome Portable 109. However, as John stated the PortableApps version of Supermium uses a different launcher than Google Chrome Portable, but it might also be an issue inside Supermium itself which has some changes in the way it handles the problematic switch/parameter.

AbsolutelyRandom
Offline
Last seen: 1 day 19 hours ago
Joined: 2019-03-22 09:18
I found a solution! I had to

I found a solution! I had to enclose --single-argument %1, so in my case it is:
@="\"C:\\PortableApps\\SupermiumPortable\\SupermiumPortable.exe\" "--single-argument %1""
Now it works properly!

MiK
Offline
Last seen: 19 hours 5 min ago
Joined: 2008-08-14 18:25
Interesting Find

This is quite an interesting find!

Actually, when realising that the --single-argument gimmick works in conjunction with the %1 flag, if I'm correct, then this odd format you've applied makes even a sense.

So, since you've found a solution for your issue, let's here recap your findings, what does work in your case, and what does not, so visitors to this thread may have a better clarity about it, by checking the following list, if interested.

This format works:
"--single-argument %1"

And, those two do not:
--single-argument %1
--single-argument "%1"

...

Additionally, as an experiment, I would try a format like this:
"--single-argument" "%1"

Probably this one wouldn't work neither, but it would be interesting to know.

AbsolutelyRandom
Offline
Last seen: 1 day 19 hours ago
Joined: 2019-03-22 09:18
The last one also works. So

The last one also works. So basically you can use:
"--single-argument %1"
or
"--single-argument" "%1"
as both work. No idea which one is better - more suitable to fit the syntax. I can open files directly (HTMLs, PDFs) as well as URLs and Supermium launches properly with included AdditionalParameters in SupermiumPortable.ini.

MiK
Offline
Last seen: 19 hours 5 min ago
Joined: 2008-08-14 18:25
More Interesting

This is even more interesting, knowing that the last "experimental" format works as well. Thank you for testing that.

As with regard to which format might be possibly better, without knowing how this works, I can say jokingly that if it were for me, I would go just by the looks, and choose the last one, as the first one looks rather oddish for me.

Log in or register to post comments