Meilleur auteur de réponses
Épingler une icone par registre

Question
-
Bonjour à tous,
Je cherche une façon rapide d'Épingler une icone dans le menu Démarrer, mais sans le faire manuellement. Je voudrais pouvoir exécuter une clé de registre ou un batch qui pourrait faire la config à ma place.
Pourquoi? et bien je veux pouvoir configurer cela suite à une restauration d'image de base Ghost ou Imagex.
merci de votre aide !
mardi 27 septembre 2011 19:16
Réponses
-
Bonjour,
Par registre ou par batch ce n'est pas possible mais avec un vbscript oui. Voici un modèle ci dessous pour éplingler Word 2010
===============================================
Option Explicit
Const CSIDL_COMMON_PROGRAMS = &H17
Const CSIDL_PROGRAMS = &H2
Const CSIDL_STARTMENU = &HBDim objShell, objFSO
Dim objCurrentUserStartFolder
Dim strCurrentUserStartFolderPath
Dim objAllUsersProgramsFolder
Dim strAllUsersProgramsPath
Dim objFolder
Dim objFolderItem
Dim colVerbs
Dim objVerbSet objShell = CreateObject("Shell.Application")
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objCurrentUserStartFolder = objShell.NameSpace (CSIDL_STARTMENU)
strCurrentUserStartFolderPath = objCurrentUserStartFolder.Self.Path
Set objAllUsersProgramsFolder = objShell.NameSpace(CSIDL_COMMON_PROGRAMS)
strAllUsersProgramsPath = objAllUsersProgramsFolder.Self.Path'Microsoft Word 2010
If objFSO.FileExists(strAllUsersProgramsPath & "\Microsoft Office\Microsoft Word 2010.lnk") Then
Set objFolder = objShell.Namespace(strAllUsersProgramsPath & "\Microsoft Office")
Set objFolderItem = objFolder.ParseName("Microsoft Word 2010.lnk")
Set colVerbs = objFolderItem.Verbs
For Each objVerb in colVerbs
If Replace(objVerb.name, "&", "") = "Épingler au menu Démarrer" Then objVerb.DoIt
Next
End If===============================================
Voici un lien pour plus d'info:
Personnaliser la barre des tâches et le menu Démarrer par script et unattend.xml
Revue du Geek | Déployer Windows 7 avec MDT 2010- Modifié Yannick PlavonilMicrosoft community contributor mardi 27 septembre 2011 19:23
- Marqué comme réponse Florin Ciuca mercredi 28 septembre 2011 07:51
mardi 27 septembre 2011 19:22 -
Le mardi 27/09/2011 21:16:00, 851d229 a écrit dans le message <news:c4dcdd60-856e-4d73-be09-d96fcd76daa0@communitybridge.codeplex.com> ce qui suit :
Bonjour à tous,
Je cherche une façon rapide d'Épingler une icone dans le menu Démarrer, mais sans le faire manuellement. Je voudrais pouvoir exécuter une clé de registre ou un batch qui pourrait faire la config à ma place.Mon script "shortcut2startmenu.vbs" fait cela nasodigitalement!
Script de création de raccourci dans le menu démarrer - JCB © 2011
--------------------------------------------
Syntaxe :
raccourci <URL>
raccourci [<\\machine\partage>]<fichier> [<dossier_démarrage>]
NB: si <dossier_de_démarrage> est omis,
le dossier du fichier est retenu
raccourci [<\\machine\partage>]<dossier>Exemples :
shortcut2startmenu http://www.bellamyjc.org/fr/vbsdownload.html
shortcut2startmenu "m:\docs\rapport d'essai.doc" m:\docs
shortcut2startmenu d:\windows\system32\drivers\etc
shortcut2startmenu \\springfield\dTéléchargeable ici :
http://www.bellamyjc.org/download/vbs/shortcut2startmenu.vbs
PS: je n'ai pas encore eu le temps de le faire apparaitre sur la page de mon site consacrée aux scripts VBS
http://www.bellamyjc.org/fr/vbsdownload.html
May the Force be with You!
La Connaissance s'accroît quand on la partage
----------------------------------------------------------
Jean-Claude BELLAMY [MVP Expert IT Pro]
http://www.bellamyjc.org ou http://jc.bellamy.free.fr- Marqué comme réponse Florin Ciuca mercredi 28 septembre 2011 07:51
mardi 27 septembre 2011 19:40
Toutes les réponses
-
Bonjour,
Par registre ou par batch ce n'est pas possible mais avec un vbscript oui. Voici un modèle ci dessous pour éplingler Word 2010
===============================================
Option Explicit
Const CSIDL_COMMON_PROGRAMS = &H17
Const CSIDL_PROGRAMS = &H2
Const CSIDL_STARTMENU = &HBDim objShell, objFSO
Dim objCurrentUserStartFolder
Dim strCurrentUserStartFolderPath
Dim objAllUsersProgramsFolder
Dim strAllUsersProgramsPath
Dim objFolder
Dim objFolderItem
Dim colVerbs
Dim objVerbSet objShell = CreateObject("Shell.Application")
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objCurrentUserStartFolder = objShell.NameSpace (CSIDL_STARTMENU)
strCurrentUserStartFolderPath = objCurrentUserStartFolder.Self.Path
Set objAllUsersProgramsFolder = objShell.NameSpace(CSIDL_COMMON_PROGRAMS)
strAllUsersProgramsPath = objAllUsersProgramsFolder.Self.Path'Microsoft Word 2010
If objFSO.FileExists(strAllUsersProgramsPath & "\Microsoft Office\Microsoft Word 2010.lnk") Then
Set objFolder = objShell.Namespace(strAllUsersProgramsPath & "\Microsoft Office")
Set objFolderItem = objFolder.ParseName("Microsoft Word 2010.lnk")
Set colVerbs = objFolderItem.Verbs
For Each objVerb in colVerbs
If Replace(objVerb.name, "&", "") = "Épingler au menu Démarrer" Then objVerb.DoIt
Next
End If===============================================
Voici un lien pour plus d'info:
Personnaliser la barre des tâches et le menu Démarrer par script et unattend.xml
Revue du Geek | Déployer Windows 7 avec MDT 2010- Modifié Yannick PlavonilMicrosoft community contributor mardi 27 septembre 2011 19:23
- Marqué comme réponse Florin Ciuca mercredi 28 septembre 2011 07:51
mardi 27 septembre 2011 19:22 -
Le mardi 27/09/2011 21:16:00, 851d229 a écrit dans le message <news:c4dcdd60-856e-4d73-be09-d96fcd76daa0@communitybridge.codeplex.com> ce qui suit :
Bonjour à tous,
Je cherche une façon rapide d'Épingler une icone dans le menu Démarrer, mais sans le faire manuellement. Je voudrais pouvoir exécuter une clé de registre ou un batch qui pourrait faire la config à ma place.Mon script "shortcut2startmenu.vbs" fait cela nasodigitalement!
Script de création de raccourci dans le menu démarrer - JCB © 2011
--------------------------------------------
Syntaxe :
raccourci <URL>
raccourci [<\\machine\partage>]<fichier> [<dossier_démarrage>]
NB: si <dossier_de_démarrage> est omis,
le dossier du fichier est retenu
raccourci [<\\machine\partage>]<dossier>Exemples :
shortcut2startmenu http://www.bellamyjc.org/fr/vbsdownload.html
shortcut2startmenu "m:\docs\rapport d'essai.doc" m:\docs
shortcut2startmenu d:\windows\system32\drivers\etc
shortcut2startmenu \\springfield\dTéléchargeable ici :
http://www.bellamyjc.org/download/vbs/shortcut2startmenu.vbs
PS: je n'ai pas encore eu le temps de le faire apparaitre sur la page de mon site consacrée aux scripts VBS
http://www.bellamyjc.org/fr/vbsdownload.html
May the Force be with You!
La Connaissance s'accroît quand on la partage
----------------------------------------------------------
Jean-Claude BELLAMY [MVP Expert IT Pro]
http://www.bellamyjc.org ou http://jc.bellamy.free.fr- Marqué comme réponse Florin Ciuca mercredi 28 septembre 2011 07:51
mardi 27 septembre 2011 19:40 -
Bonjour,
Merci de suivre les solutions proposées ici.
Cordialement,
Florin
Florin CIUCA, MSFT
Votez! Appel à la contribution
Nous vous prions de considérer que dans le cadre de ce forum on n’offre pas de support technique et aucune garantie de la part de Microsoft ne peut être offerte.mercredi 28 septembre 2011 07:52 -
Le mardi 27/09/2011 21:40:37, Jean-Claude BELLAMY a écrit dans le message <news:da43e81a-3e6a-4cf6-a26b-15a3bb3dcb5e@communitybridge.codeplex.com> ce qui suit :
Le mardi 27/09/2011 21:16:00, 851d229 a écrit dans le message <news:c4dcdd60-856e-4d73-be09-d96fcd76daa0@communitybridge.codeplex.com> ce qui suit :
[...]
Téléchargeable ici :
http://www.bellamyjc.org/download/vbs/shortcut2startmenu.vbs
PS: je n'ai pas encore eu le temps de le faire apparaitre sur la page de mon site consacrée aux scripts VBS http://www.bellamyjc.org/fr/vbsdownload.htmlÇa, y est, j'ai mis à jour mon site, "shortcut2startmenu" y apparait
http://www.bellamyjc.org/fr/vbsdownload.html#shortcut2startmenu
May the Force be with You!
La Connaissance s'accroît quand on la partage
----------------------------------------------------------
Jean-Claude BELLAMY [MVP Expert IT Pro]
http://www.bellamyjc.org ou http://jc.bellamy.free.frmercredi 28 septembre 2011 09:53 -
j'ai testé les 2 solutions mais il semble manquer quelque chose car ça ne fonctionne pas correctement....
je vais continuer à tester.
merci de votre aide
mercredi 28 septembre 2011 19:48 -
Le mercredi 28/09/2011 21:48:16, 851d229 a écrit dans le message <news:1d8709e2-0de4-4752-9457-cf2138d3c985@communitybridge.codeplex.com> ce qui suit :
j'ai testé les 2 solutions mais il semble manquer quelque chose car ça ne fonctionne pas correctement....
Mais encore ?
Quel(s) message(s) d'erreur éventuel(s) ?
May the Force be with You!
La Connaissance s'accroît quand on la partage
----------------------------------------------------------
Jean-Claude BELLAMY [MVP Expert IT Pro]
http://www.bellamyjc.org ou http://jc.bellamy.free.frjeudi 29 septembre 2011 07:25