Read Command-Line Arguments from a File on Startup

  • You can already pass command-line arguments to vivaldi.exe directly in a command prompt or by modifying a Vivaldi shortcut. The problem with this is that if Vivaldi is launched by a file/protocol association where the command in the registry is used instead, Vivaldi won't launch with those arguments. You could modify the registry commands for Vivaldi to also contain the arguments you want, but those can get overwritten on you during update/install and default browser association.

    What would be great is for the Vivaldi executable to support an args file next to it that it reads on startup and adds to the command-line arguments. The file format could be a simple text file or a json file. Whatever's easier.

  • I know in Linux you can do this for any program - but that's Linux. Just use program @filename. No idea of a similar feature in Windows, but there probably is something like it. (Which is another way of saying, it probably exists in the OS, so why should they add it?)

  • @sgunhouse said in Read Command-Line Arguments from a File on Startup:

    Just use program @filename

    Hmm, I'll investigate this. Thanks. Although, if it works, that'd still require modifying the registry (to change the commands to pass @filename to them).

  • launcher.exe @filename doesn't seem to work. I see on the net that @filename is supported by some programs (command-line utilities) though.

  • That is why I said "in Linux" ... but it may be an idea for Vivaldi (and possibly Opera).

  • The Windows commands assoc and ftype might be able to add additional options to open files in combination without hacking the registry (basically they do it for you), however I see problems with an already running instance of Vivaldi in certain cases (profile conflicts etc. pp.)

    For help type assoc /? or ftype /? in a CMD window - but be warned, there is no safety net in the CMD. If you mess things up in the CMD, things are messed up afterwards.

    For my own use I don't associate filetypes to open but have created small command scripts that can take files/urls/whatever Vivaldi can open as command line parameter (some even by drag and drop), open Vivaldi with different profiles and clean up after exit or not, depends what they should do. This is quite powerful but definitely not what I would call user friendly ...

    (With a few exceptions I generally do not associate such things because I would need to manually remove all stuff afterwards if I change things - I am too lazy to do that, therefore I prefer normal CMD scripts: Delete and everything is gone 😃 )

  • What I'm doing right now for Opera is, I rename its launcher.exe to reallauncher.exe. Then, I have my own launcher.exe that I put in place of the real one. It accepts args passed to it, adds the ones I want and then passes them all to reallauncher.exe. That works and it's not too bad to do it again on Opera update. Not sure if that'll work for Vivadli though as it doesn't use a launcher exactly and renaming vivaldi.exe might not work.

  • Different Idea: Do you still remember the good old sendTo?
    Just type sendTo into the address bar of the explorer, press enter and add shortcuts to Vivaldi there. You can right-click edit the shortcuts to contain all kinds of command line parameters like you can do any other shortcut.

    To invoke it just right-click on the file or url you want to open, select "send to" and click on the shortcut.

    Yes, it is 2 clicks and some movement but it should be fine as long as you don't open such stuff all the time - and you don't have to mess with the CMD console or regedit.

  • Moderator

    That was a longstanding wish i reported years ago to get a command line parameter and/or special config file to add parameters.

    My feature request was reported in 2015 as:
    VB-5294 "Reading commandline parameters from user config file or environment variable"

  • Here's an example for Vivaldi:

  • Under Windows, you can use mklink, to create a symbolic link.

  • @dermitdemdino How can that help in this situation?

  • @burnout426 You can set a symbolik link, that vivaldi.exe is start permanently with your parameters. I don't have a Windows system for testing, though, because I use Linux.

  • @dermitdemdino Okay, I'll look into that. Thanks.

Log in to reply

Looks like your connection to Vivaldi Forum was lost, please wait while we try to reconnect.