Skip to content

Instantly share code, notes, and snippets.

@imasaru
Last active February 19, 2020 23:46
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save imasaru/4d2eeca09efd4c545b93bc71a9903577 to your computer and use it in GitHub Desktop.
Save imasaru/4d2eeca09efd4c545b93bc71a9903577 to your computer and use it in GitHub Desktop.
My script for launching Vivaldi with a specific profile. Inspired by a similar Automator program for macOS. I like to link this to a shortcut and launch it from my taskbar for convenience.
@echo off
:default
echo Launch DEFAULT profile? [Y/N] or Enter to launch.
set /P D= : %=%
if /I "%D%"=="n" goto name
if /I "%D%"=="y" start vivaldi.exe && exit
start vivaldi.exe && exit
:name
echo Type in the profile name (default is "Default" w/o quotes and capitalized).
set /P P= : %=%
:check
if exist "C:\Users\%USERNAME%\AppData\Local\Vivaldi\User Data\%P%" ( goto launch ) else ( goto confirm )
:confirm
echo Profile "%P%" does not seem to exist. Do you want to create it? CAUTION: This may delete existing profiles. [Y/N]
set /P C= : %=%
if /I "%C%"=="y" goto launch
if /I "%C%"=="n" goto name
:launch
echo Launching Vivaldi with profile "%P%".
start vivaldi.exe --args --user-data-dir="C:\Users\%USERNAME%\AppData\Local\Vivaldi\User Data\%P%"
@imasaru
Copy link
Author

imasaru commented Jan 1, 2018

How I make my shortcut accessible from the taskbar:

  1. Add "Explorer" to the shortcut target, making something like this:
    Explorer C:\Users\imasaru\Desktop\vivaldi.bat
    (Explorer will be expanded to its full path upon saving changes)

  2. (experimental) After adding it to the taskbar, remove the Explorer target from the shortcuts. I've had odd experiences of the original files disappearing on reboot. I don't know if the Explorer target has anything to do with it.

You should then be able to add the shortcut to the taskbar by dragging it or using the right-click menu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment