Redirection en fonction du fabricant de l'ordinateur

Description

Ce script permet d'ouvrir la page en fonction du fabricant de l'ordinateur.
Ex: acer -> support technique

Source / Exemple :


Option Explicit

Private WshShell
Private FSO
Set WshShell=CreateObject("WScript.Shell")
Set FSO = CreateObject("Scripting.FileSystemObject")

On Error Resume Next 'Pour éviter l'affichage d'une erreur 
If err.number = 0 Then 
  

Dim supporturl, brand
brand = WshShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\OEM\Metadata\Brand")

If StrComp(Trim(LCase(brand)), "acer")=0 Then         
        Dim ws
        Set ws = CreateObject("WScript.Shell")
        ws.Run "http://www.acer.com/worldwide/support/", 1 
End If
If StrComp(Trim(LCase(brand)), "emachines")=0 Then    
        Dim ws2
        Set ws2 = CreateObject("WScript.Shell")
        ws2.Run "http://www.emachines.com/selection/?__utma=1.1307544488.1300888667.1300888667.1300888667.1&__utmb=1.3.10.1300888667&__utmc=1&__utmx=-&__utmz=1.1300888667.1.1.utmcsr=emachines.com|utmccn=(referral)|utmcmd=referral|utmcct=/selection/", 1  
End If
If StrComp(Trim(LCase(brand)), "packard bell")=0 Then
        Dim ws3
        Set ws3 = CreateObject("WScript.Shell")
        ws3.Run "http://www.packardbell.com/index.html", 1
End If
If StrComp(Trim(LCase(brand)), "gateway")=0 Then      
        Dim ws4
        Set ws4 = CreateObject("WScript.Shell")
        ws4.Run "http://www.gateway.com/worldwide/", 1 
End If
If StrComp(Trim(LCase(brand)), "hp")=0 Then    
        Dim ws5
        Set ws5 = CreateObject("WScript.Shell")
        ws5.Run "http://welcome.hp.com/country/", 1
End If
If StrComp(Trim(LCase(brand)), "dell")=0 Then    
        Dim ws6
        Set ws6 = CreateObject("WScript.Shell")
        ws6.Run "http://support.euro.dell.com/support/index.aspx?~f=lg", 1  
End If
If StrComp(Trim(LCase(brand)), "assus")=0 Then    
        Dim ws7
        Set ws7 = CreateObject("WScript.Shell")
        ws7.Run "http://support-org.asus.com/", 1  
End If
If StrComp(Trim(LCase(brand)), "nec")=0 Then    
        Dim ws8
        Set ws8 = CreateObject("WScript.Shell")
        ws8.Run "http://www.nec.com/global/support/", 1  
End If
If StrComp(Trim(LCase(brand)), "compaq")=0 Then    
        Dim ws9
        Set ws9 = CreateObject("WScript.Shell")
        ws9.Run "http://www.compaq.com/cpq-country/cpq_support.html", 1  
End If
If StrComp(Trim(LCase(brand)), "samsung")=0 Then    
        Dim ws10
        Set ws10 = CreateObject("WScript.Shell")
        ws10.Run "http://www.samsung.com/fr/consumer/it/notebook/index.idx?pagetype=type_p2&", 1  
End If
If StrComp(Trim(LCase(brand)), "sony")=0 Then    
        Dim ws11
        Set ws11 = CreateObject("WScript.Shell")
        ws11.Run "https://forum.sel.sony.com/?XID=M:showcase:esupport", 1  
End If

End If 
	

'IE Online Suppot
WshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Help_Menu_URLs\Online_Support", supporturl, "REG_SZ"

Conclusion :


-Liste exaustive
-Ne marche pas sur toutes machines (à vous de le dire).
-> Packard Bell: Fontionne

Nota: Des rectifs seront faites ultérieurement.

Codes Sources

A voir également

Vous n'êtes pas encore membre ?

inscrivez-vous, c'est gratuit et ça prend moins d'une minute !

Les membres obtiennent plus de réponses que les utilisateurs anonymes.

Le fait d'être membre vous permet d'avoir un suivi détaillé de vos demandes et codes sources.

Le fait d'être membre vous permet d'avoir des options supplémentaires.

Du même auteur (MacGaliver)