@raxzorm Kinda old topic, and you might have figured it out already, but here's the answer:
[tl:dr] add the Opera GX folder to the PATH environment variable.
(Opera GX's default installation is at AppData/Local/Programs/Opera GX/)
Open Windows Settings (prob just called Settings), go to System > About and click on the Advanced System Settings link.
This will open a window called System Properties.
Click on Environment Variables. You'll find two areas: User variables and System variables - I recommend changing only your User variables, if you share your computer. Else do the system one (chaging this one will make this work if you run as admin or other users as well).
Be careful not to delete any of the entries, as some programs and, well... your system rely on these.
On the Path variable, click on Edit.
A new window will pop up, called Edit the environment variable. There, you can click on New and add the path to the Opera GX folder.
(Opera GX's default installation is at %AppData%/Local/Programs/Opera GX/)
Then, click OK on all the Windows and you'll be able to run the command opera
to open your Opera GX on your shell of preference (such as cmd - command prompt).
You can even use opera {insert your website address here}
to open any website you want. As an example, try typing opera https://forums.opera.com/topic/51277/cmd-for-start-opera-gx/4
. You'll see this page will open.
If you have your shell (such as cmd) open, you'll need to close it and open it again for this to work - then it will work every time.
A little explanation on how this works:
Basically, the PATH environment variable will make your shell "remember" the paths of the folders that are in it.
Then, if you type the name of the file, it'll execute it, even though your shell is not on the same folder as that file (in our case, you can type launcher
or opera
, as both of these are executables in the Opera GX folder).