sintassi:
Set WshShell = CreateObject("Wscript.Shell") creo oggetto Wscript.Shell
Set OggettoLink = WshShell.CreateShortcut("path\file.lnk") creo oggetto Shortcut indicano path+file (indicare sempre estensione .lnk)Set WshShell = Nothing cancella la memoriaWith OggettoLinkSet OggettoLink = Nothing cancella la memoria.TargetPath = "path + fileorigine.xxx" path + file di origineEnd With
.WorkingDirectory = "path origine" path di orgine
.Arguments = "..." eventuali armonenti aggiuntivi in caso di software (ex. -n -m)
.WindowStyle = x tipo di visualizzazione.Description = "...." descrizione/commento
- 1 normale
- 3 tutto schermo
- 7 ad icona
.Save salva l'oggetto link
esempio
Set WshShell = CreateObject("Wscript.Shell")
Set oShellLink = WshShell.CreateShortcut("C:\Downloads\destinazione\ciao.lnk")Set WshShell = NothingWith oShellLinkSet oShellLink = Nothing.TargetPath = "C:\Downloads\test.txt"End With
.WorkingDirectory = "C:\Downloads\"
.WindowStyle = 3
.Description = "file testo prova"
.Save