Starting Opera from a .BAT file
-
A Former User last edited by
When I click on my opera icon:
a) if opera not loaded, it opens opera with last set of tabs
b) if opera already loaded, it adds a new Speed Dial tabThis is exactly what I want to have happen but within a batch file.
So far I have
start "C:\Program Files (x86)\Opera\launcher.exe"
(identical to "Target" in icon properties)
but that leaves me in a command window, not in Opera
-
zalex108 last edited by zalex108
@martinrinehart said in Starting Opera from a .BAT file:
start "C:\Program Files (x86)\Opera\launcher.exe"
Or
Start C:"Program Files (x86)"\Opera\launcher.exe
Windows 10 (x64) | Anniversary Update
Opera Stable · Beta · DeveloperTest profile | Back up Linux · Mac · Win
"You cannot know the meaning of your life until you are connected to the power that created you". · Shri Mataji Nirmala Devi
-
zalex108 last edited by zalex108
@burnout426 said in Starting Opera from a .BAT file:
Does:
cmd /k launcher.exe
do the trick?
But this keeps the Command Prompt opened - as appears in CMD help -.
@martinrinehart said in Starting Opera from a .BAT file:
When I click on my opera icon:
a) if opera not loaded, it opens opera with last set of tabs
b) if opera already loaded, it adds a new Speed Dial tabFor A) ... "it opens opera with last set of tabs" You have to set this on Opera.
@zalex108 said in Starting Opera from a .BAT file:
Start C:"Program Files (x86)"\Opera\launcher.exe
This command has missed the * \ *
The forum deletes the first \ .Should be:
Start C: \ "Program Files (x86)"\Opera\launcher.exe
Without spaces.
Windows 10 (x64) | Anniversary Update
Opera Stable · Beta · DeveloperTest profile | Back up Linux · Mac · Win
"You cannot know the meaning of your life until you are connected to the power that created you". · Shri Mataji Nirmala Devi
-
burnout426 Volunteer last edited by
@zalex108 said in Starting Opera from a .BAT file:
But this keeps the Command Prompt opened
Oops. I was testing by typing in a command prompt instead of double-left-clicking a batch file. It launches Opera and focus it without launching a new command prompt. But, it's not what the OP wanted, so never mind.
-
burnout426 Volunteer last edited by
What about?:
test.bat
cmd /c "C:\Program Files\Opera\launcher.exe" exit
-
alobpreis last edited by
Start expects the first double quote to be the window title, so what you should do is simply:
start "" "C:\Program Files (x86)\Opera\launcher.exe"
-
A Former User last edited by
Sorry for being so slow, but thank you, zalex.
I switched a couple occurences from
start "the whole/damn/string"
to
start "the whole"/damn.string
because I liked your quotes specificity better than the mine.
And, magically, it started to work.
-
alobpreis last edited by
@martinrinehart , that's because what I posted. You "fixed" it by making the first parameter not start with a quote, but that way of specifying a path is nonstandard. I would highly recommend placing the whole path between quotes and just add a window title parameter (empty if you like), like what I suggested.
-
zalex108 last edited by zalex108
Glad to know that
I've tried your suggestion - since didn't know the other one is not standard - but your suggestion didn't worked in a scenario where would be better to avoid too many | "'s|.
Start"" "D:\Time Machine\New folder\Opera Neon\Application\Neon.exe"
But,
Works fine - despite would exist an easy option -.
"You cannot know the meaning of your life until you are connected to the power that created you". · Shri Mataji Nirmala Devi
-
alobpreis last edited by
@zalex108 said in Starting Opera from a .BAT file:
avoid too many | "'s|.
I don't understand you. My option has less double quotes than the one that worked. What issue did you have with start "" "D:\Time...\Neon.exe"? (I hope it's not the missing space after "start" in your post, right?)
-
zalex108 last edited by zalex108
@alobpreis said in Starting Opera from a .BAT file:
@zalex108 said in Starting Opera from a .BAT file:
avoid too many | "'s|.
I don't understand you. My option has less double quotes than the one that worked. What issue did you have with start "" "D:\Time...\Neon.exe"? (I hope it's not the missing space after "start" in your post, right?)
I mean about that too, to use less "'s | "Double quotes" |, because that I've tested but did not work.
I've let an space between the double quotes and the quotes to start the path too - as seen in your post -.--
Right now, tested without the space, same result.
OK!
An space between Start and double quotes and between the quotes of the path.Now works.
"It was the missing space " xD
Then,
@martinrinehart Once tested I recommend the @alobpreis version, it works it's more convenient to avoid the "'s - |double quotes| -, you can "copy as path" and it's enough to launch the command or bat.Now I learnt the right way.
Thanks both
"You cannot know the meaning of your life until you are connected to the power that created you". · Shri Mataji Nirmala Devi