Script vbs prenant place du raccourci internet explorer et permettant de changer la page de démarrage

Contenu du snippet

Bonjour à tous,
ce petit script permet de changer à chaque lancement d'IE la page de démarrage.
Comme vous le constaterez, vous mettez ce que vous voulez comme nombre de pages, il suffit de supprimer les tests imbriqués ou en rajouter.
Je vous conseille de mettre ce script sur votre disque dur et de mettre des raccourcis pointant sur le script comme ça vous pourrez changer très simplement l'icône VBS en IE.
Merci pour votre indulgence car je ne connait pas vraiment le VBS...
@ bientôt
AlCapoon

Source / Exemple :


' ----------------------------------------------------------
' Script VBS de lecture de clef de la BDR
' JCB - © 2002
' ----------------------------------------------------------
Dim Shell
Set Shell = WScript.CreateObject("WScript.Shell")
Set oIE = CreateObject("InternetExplorer.Application")
' ----------------------------------------------------------
If Shell.RegRead("HKCU\Software\Microsoft\Internet Explorer\Main\Start Page") = "http://www.clubic.com/" then
	Shell.RegWrite "HKCU\Software\Microsoft\Internet Explorer\Main\Start Page", "http://www.01net.com/"
Else
If Shell.RegRead("HKCU\Software\Microsoft\Internet Explorer\Main\Start Page") = "http://www.01net.com/" then
	Shell.RegWrite "HKCU\Software\Microsoft\Internet Explorer\Main\Start Page", "http://www.01net.com/BusinessTechnologies/"
Else
If Shell.RegRead("HKCU\Software\Microsoft\Internet Explorer\Main\Start Page") = "http://www.01net.com/BusinessTechnologies/" then
	Shell.RegWrite "HKCU\Software\Microsoft\Internet Explorer\Main\Start Page", "http://www.01net.com/MicroPerso/"
Else
If Shell.RegRead("HKCU\Software\Microsoft\Internet Explorer\Main\Start Page") = "http://www.01net.com/MicroPerso/" then
	Shell.RegWrite "HKCU\Software\Microsoft\Internet Explorer\Main\Start Page", "http://telecharger.01net.com/"
Else
If Shell.RegRead("HKCU\Software\Microsoft\Internet Explorer\Main\Start Page") = "http://telecharger.01net.com/" then
	Shell.RegWrite "HKCU\Software\Microsoft\Internet Explorer\Main\Start Page", "http://www.01net.com/actus/"
Else
If Shell.RegRead("HKCU\Software\Microsoft\Internet Explorer\Main\Start Page") = "http://www.01net.com/actus/" then
	Shell.RegWrite "HKCU\Software\Microsoft\Internet Explorer\Main\Start Page", "http://www.01net.com/produits/"
Else
If Shell.RegRead("HKCU\Software\Microsoft\Internet Explorer\Main\Start Page") = "http://www.01net.com/produits/" then
	Shell.RegWrite "HKCU\Software\Microsoft\Internet Explorer\Main\Start Page", "http://www.01net.com/distribution/"
Else
If Shell.RegRead("HKCU\Software\Microsoft\Internet Explorer\Main\Start Page") = "http://www.01net.com/distribution/" then
	Shell.RegWrite "HKCU\Software\Microsoft\Internet Explorer\Main\Start Page", "http://www.clubic.com/"
End If
End If
End If
End If
End If
End If
End If
End If
oIE.navigate Shell.RegRead("HKCU\Software\Microsoft\Internet Explorer\Main\Start Page")
oIE.visible=1

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.