Last active
February 19, 2020 23:46
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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%" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How I make my shortcut accessible from the taskbar:
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)
(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.