Exemples de recherches Google
www.google.fr/search?q=vbscript+-ASP
www.google.fr/search?q=vbscript+date+fonctions+-ASP
www.google.fr/search?num=99&q=site:commentcamarche.net/contents
www.google.fr/search?num=99&q=site:commentcamarche.net/contents/vbscript
www.google.fr/search?num=99&q=site:bellamyjc.org/download/vbs+exist
www.google.fr/search?num=99&q=site:bellamyjc.org/download/vbs+exists
www.google.fr/search?num=99&q=site:technet.microsoft.com/en-us/scriptcenter
http://groups.google.fr/group/microsoft.public.scripting.vbscript/search?q=how+to
www.jalix.org/ressources/internet/asp/_vbscript/html
www.jalix.org/ressources/internet/asp/_vbscript/html/vbstutor.htm
www.bellamyjc.org/fr/vbsgeneralites.html
www.bellamyjc.org/fr/vbsfonctions.html
www.bellamyjc.org/fr/vbsinstructions.html
www.bellamyjc.org/fr/vbsconstantes.html
www.bellamyjc.org/fr/vbsobjets.html
www.bellamyjc.org/fr/vbsavance.html
www.bellamyjc.org/fr/vbsdownload.html
www.bellamyjc.org/fr/vbs/vtglossary.html
www.google.fr/search?num=99&q=site:bellamyjc.org+vbs
www.google.fr/search?num=99&q=site:bellamyjc.org/download
www.google.fr/search?num=99&q=site:bellamyjc.org/download/vbs
www.google.fr/search?num=99&q=site:bellamyjc.org/download/vbs+exist
www.google.fr/search?num=99&q=site:bellamyjc.org/download/vbs+exists
http://fr.wikibooks.org/wiki/Programmation_VBscript
http://docvb.free.fr/api.php
http://allapi.mentalis.org
www.microsoft.com/technet/scriptcenter/default.mspx
www.microsoft.com/technet/scriptcenter/hubs/start.mspx
www.microsoft.com/technet/scriptcenter/resources/qanda/default.mspx
www.microsoft.com/technet/scriptcenter/resources/qanda/basic.mspx
www.google.fr/search?num=99&q=site:microsoft.com/france/technet/scriptcenter
Exemples expliqués en français :
http://technet.microsoft.com/fr-fr/scriptcenter/default.aspx
(redirection de
http://www.microsoft.com/technet/community/scriptcenter/scresorc.mspx)
Exemples en anglais
Hey, Scripting Guy !
http://technet.microsoft.com/en-us/scriptcenter/default.aspx
(Rechercher
dans ce site)
http://gallery.technet.microsoft.com/ScriptCenter/
The Portable Script Center
Collection d'exemples regroupés dans un fichier d'aide :
script_center.chm
Groupes de discussion
http://groups.google.com/group/microsoft.public.fr.scripting /
news://msnews.microsoft.com/microsoft.public.fr.scripting
http://groups.google.fr/group/microsoft.public.scripting.wsh
http://groups.google.fr/group/microsoft.public.scripting.vbscript
http://groups.google.fr/group/microsoft.public.scripting.vbscript/search?q=how+to
http://groups.google.fr/groups/dir?sel=usenet=microsoft.public.scripting
Windows Script 5.6 Documentation : SCRIPT56.CHM (2.77 Mo)
http://download.microsoft.com/download/winscript56/install/5.6/w98nt42kme/fr/scd56fr.exe
Windows Script 5.6 pour Windows 2000 et XP :
WindowsXP-Windows2000-Script56-KB917344-x86-fra.exe
Version anglaise :
www.microsoft.com/downloads/details.aspx?FamilyId=01592C48-207D-4BE1-8A76-1C4099D7BBB9
En ligne :
http://msdn.microsoft.com/en-us/library/ms950396.aspx ==>
VBSCript
Divers
Enterprise Logon Scripts : Logon_Scripts.doc
Automating TCP/IP Networking on Clients
Site de Gilles LAURENT
Rob van der Woude's Scripting Pages
en anglais mais très complet, avec explications et exemples, non seulement pour
le batch et le vbs, mais aussi pour d'autres langages.
Puisqu'on parle de batch, autant rappeler ici quelques liens :
http://www.hotline-pc.org/batch.htm
http://www.hotline-pc.org/batchscripts.htm
http://www.hotline-pc.org/invitedecommandes.htm
http://www.hotline-pc.org/dosastuces.htm
http://windows.developpez.com/cours/ligne-commande
http://www.mclaveau.com/batch
http://www.mclaveau.com/grimoire/bleu.html
http://www.google.fr/search?num=99&q=site:forum.zebulon.fr+batch
http://astase.com
http://astase.com/forums
http://astase.com/forums/viewforum.php?id=2
ftp://anonymous.ftp.ovh.net/astase/windows/tutoriel_batch.pdf
http://www.google.fr/search?num=99&q=site:astase.com+batch
On est parfois amené à
utiliser une commande ou un batch depuis un script VBS, et l'apparition d'une
fenêtre noire, même un bref instant, nuit un peu à l'esthétisme. Voir les
arguments intWindowsStyle et bWaitOnReturn de la commande Run :
http://www.commentcamarche.net/contents/vbscript/vbs-wshshell.php3
Dans les exemples suivants on utilisera la commande wscript pour lancer les
scripts VBS.
Avec un raccourci de la forme : wscript
c:\scripts\invisibledir.vbs
Script en une seule instruction
Ce script effectue une commande dir /ogn redirigée vers un fichier %TEMP%\tmp.txt,
puis exécute tmp.txt :
CreateObject("Wscript.Shell").Run "cmd /c dir /ogn>%TEMP%\tmp.txt&&start %TEMP%\tmp.txt",
0, False
Script qui exécute un batch
affichdir.cmd :
cd /d %temp%
chcp 1252
dir /ogn>tmp.txt
notepad tmp.txt
del /q tmp.txt
Script invisibledir.vbs :
Set oShell = CreateObject("WScript.Shell")
oShell.Run "affichdir.cmd", 0, true
Script qui écrit le batch à exécuter
Méthode appréciée pour sa cohésion : création par le script d'un batch temporaire tmp.cmd, écriture des commandes
dans ce fichier, exécution de tmp.cmd de façon masquée, puis suppression du
batch :
Set oShell = CreateObject("WScript.Shell")
Set oFs = CreateObject ("Scripting.FileSystemObject")
oFS.CreateTextFile ("tmp.cmd")
Const ForReading = 1, ForWriting = 2
Set oFile = oFs.OpenTextFile ("tmp.cmd", ForWriting)
oFile.Writeline "chcp 1252"
oFile.Writeline "dir /ogn>%TEMP%\tmp.txt"
oFile.Writeline "%TEMP%\tmp.txt"
oFile.Close
oShell.Run "tmp.cmd",0,true
oFS.DeleteFile ("tmp.cmd")
Merci d'avoir lu jusqu'ici !
Retour au début
Les restes du site
JF
(Jean-François)
Publié le 16/05/2007