1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| Option Explicit
Const Key = "HKCU\Software\Microsoft\Windows\CurrentVersion\Run\"
Dim WS, AppName, AppTitle
Set WS = CreateObject("WScript.Shell")
AppTitle = "Launcher"
AppName = Wscript.FullName
' Vérifie si la valeur existe, sinon l'inscrit.
With WS
On Error Resume Next ' Utile uniquement à la première exécution du script
If .RegRead(Key & AppTitle) = "" Or _
.RegRead(Key & AppTitle) <> AppName & " " & Wscript.ScriptFullName Then
.RegWrite Key & AppTitle, AppName & " " & Wscript.ScriptFullName
Else
'Exit Sub
End If
End With
'===============Lancement des progs =============
' Page iternet
WS.Run "iexplore.exe https://cmontmorency.moodle.decclic.qc.ca", 1, True
' Si le lecteur est déjà mappé :
WS.Run "Explorer.exe S:", 1, True |
Partager