1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
sub supprrac
'Déclaration des variables
Dim Shell, DesktopPath, objFSO
'Création des variables
Set Shell = CreateObject("WScript.Shell" )
DesktopPath = Shell.SpecialFolders("Desktop" )
Set objFSO = CreateObject("Scripting.FileSystemObject" )
'Supression du raccourci
If objFSO.FileExists(DesktopPath & "\nas-*.lnk" ) Then
MsgBox "Ca marche !"
objFSO.DeleteFile DesktopPath & "\nas-*.lnk"
End If
REM If objFSO.FileExists(DesktopPath & "\nav*.lnk" ) Then
REM objFSO.DeleteFile DesktopPath & "\nav*.lnk"
REM End If
end sub |
Partager