Starting Opera from a .BAT file
-
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