Jonno12345 / TileIconifier

Creates tiles for most Windows 8.1 and 10 start menu icons
MIT License
1.37k stars 67 forks source link

[Feature Request] Battle.Net Support #113

Open fuba82 opened 6 years ago

fuba82 commented 6 years ago

hi there, can you add Battle.Net Support?

All the games you can start directly with the following commands:

"C:\Program Files (x86)\Blizzard App\Battle.net.exe" "<Game-URI>"

Example will start Diablo 3 directly with the Battle.Net Launcher:

"C:\Program Files (x86)\Blizzard App\Battle.net.exe" "battlenet://D3"

All known Game-URI's are:

Game URI
World of Warcraft battlenet://WoW
Diablo 3 battlenet://D3
Heroes of the Storm battlenet://Hero
battlenet://heroes
Starcraft Remastered battlenet://S1
battlenet://SCR
Starcraft 2 battlenet://S2
battlenet://starcraft
Hearthstone battlenet://WTCG
Overwatch battlenet://Pro
Destiny 2 battlenet://DST2
Jonno12345 commented 6 years ago

Hi, will look into this, thanks.

For my future reference, one more: Overwatch is battlenet://Pro

fuba82 commented 6 years ago

Hi, will look into this, thanks. For my future reference, one more: Overwatch is battlenet://Pro

oh yes you're right... i forgot Overwatch :D

Edit Added Overwatch and more to the table just for clearity ;)

NutritiousCookie commented 6 years ago

For further reference, these are normally handled as internet shortcuts, the "C:\Program Files (x86)\Blizzard App\Battle.net.exe" is just a workaround to change that to a normal file shortcut. This could be solved by allowing TileIconifier to recognize internet shortcuts.

Steam works in the same way. For example, this is used to launch Civ V: steam://rungameid/8930

fuba82 commented 6 years ago

For further reference, these are normally handled as internet shortcuts, the "C:\Program Files (x86)\Blizzard App\Battle.net.exe" is just a workaround to change that to a normal file shortcut. This could be solved by allowing TileIconifier to recognize internet shortcuts.

Steam works in the same way. For example, this is used to launch Civ V: steam://rungameid/8930

They are not "Internet Shortcuts"! This is known as "URI Sheme" but many people make the mistake and think this "URL Sheme" but it is not becasue there is no URL Sheme ;)

and URI Sheme does exactly work like this: "C:\Program Files (x86)\Blizzard App\Battle.net.exe" "<Game-URI>" but you do not see it becasue it's stored at the Registy.

The simple way would be to just "Run" the URI from the vbs script like this:

'Custom Shortcut Type = "Other"
'Shortcut Name = "Diablo III"
'Shortcut Path = "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\TileIconify\Custom Shortcuts\Diablo III\Diablo III.lnk"

Dim targetURI

targetURI = "battlenet://D3"

Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run targetURI

for more info look here: https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/aa767914(v=vs.85)

But all this is just a suggestion because it also work the "Simple" way ;)

NutritiousCookie commented 6 years ago
screenshot 1

It appears battle.net shortcuts default to the actual .exe file for the game. Steam doesn't always have this, is there a reason to do it for Battle.net?

fuba82 commented 6 years ago

Methode has changed! Blizzard broke the URI Feature of the Launcher now :P

New Methode is now -> run the Battle.Net Launcher with commandline to directly start a game

--exec="launch DST2"        Launches Destiny 2
--exec="launch WoW"     Launches WoW
--exec="launch VIPR"        Launches CoD: Black Ops 4 (probably, not out yet)
--exec="launch D3"      Launches Diablo 3
--exec="launch S1"      Launches Starcraft Remastered
--exec="launch S2"      Launches Starcraft 2
--exec="launch WTCG"        Launches Hearthstone
--exec="launch Hero"        Launches HOTS (not tested)
--exec="launch Pro"     Launches Overwatch
--exec="focus play"     Opens or switches to Game tab
--exec="focus shop"     Opens or switches to Shop tab
--exec="focus social"       Opens or switches to Social tab
--exec="focus news"     Opens or switches to News tab
--exec="dialog friends"     Opens Friends window
--exec="dialog settings"    Opens Launcher and goes to Settings window

Example:

"C:\Program Files (x86)\Battle.net\Battle.net.exe" --exec="launch D3

Source: https://github.com/dafzor/bnetlauncher/issues/22#issuecomment-399788430

SystemDisc commented 5 years ago

There's also VIPR for Black Ops 4 https://github.com/dafzor/bnetlauncher/issues/22#issuecomment-399976944