Il va falloire créer un "custom protocol" dans Windows pour ouvrir un lien avec chrome.
On peut nommer ce protocol "ChromeLink". Voici les clés de registre pour la création.
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\chromelink]
@="URL:chromelink Protocol"
"EditFlags"=dword:00033450
"URL Protocol"=""
[HKEY_CLASSES_ROOT\chromelink\DefaultIcon]
@="iexplore.exe,1"
[HKEY_CLASSES_ROOT\chromelink\shell]
[HKEY_CLASSES_ROOT\chromelink\shell\open]
[HKEY_CLASSES_ROOT\chromelink\shell\open\command]
@="\"C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe\" -WindowStyle Hidden \"& \"\"C:\\Program Files\\ChromeLink\\Open-Chrome.ps1\"\"\"\" -url '%1'"
Pour réussir à ouvrir Google Chrome et passer en paramètre le bon URL, il faut créé un script powershell qui doit être déposé sur les postes de travail des personnes dans le répertoire « C:\program files\ChromeLink » puis le fichier powershell se nomme « Open-Chrome.ps1 »
Le script powershell est le suivant :
Param (
$url
)
$url = $url -replace "chromelink://",""
If (Test-Path -Path "${env:ProgramFiles(x86)}\Google\Chrome\Application\Chrome.exe") {
."${env:ProgramFiles(x86)}\Google\Chrome\Application\Chrome.exe" $url
}
Else {
."$env:ProgramFiles\Google\Chrome\Application\Chrome.exe" $url
}
Ensuite, lorsque ceci est créé sur le poste, pour utiliser le protocole il faut ajouter devant l’URL en question notre nouveau protocole (Ex : chromelink://http://google.ca), l’utilisateur va voir pendant une seconde une petite fenêtre bleue de Powershell apparaître puis ensuite chrome s’ouvrir sur la page web en question.
Information additionnelle :
- Le nouveau Microsoft Edge (chromium) est cependant fonctionnel pour le Peer-to-peer
- Pour éliminer le message d’avertissement dans IE, il faut ajouter une clé de registre
- Path x86 : HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\ProtocolExecute\chromelink
- Path x64 : HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\ProtocolExecute\chromelink
- Clé : WarnOnOpen (DWORD)
- Valeur : 0
- Pour éliminer le message d’avertissement dans Outlook, il faut ajouter une clé de registre :
- HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\16.0\Common\Security\Trusted Protocols\All applications\chromelink:
- Pas besoin de créer de clé autre que le « répertoire »
- Ne fonctionne pas pour les MAC