• VBScript > créer un raccourci sur le bureau

      set WshShell = WScript.CreateObject("WScript.Shell")
      strDesktop = WshShell.SpecialFolders("Desktop")
      set oShellLink = WshShell.CreateShortcut(strDesktop & "\Shortcut Script.lnk")
      oShellLink.TargetPath = WScript.ScriptFullName
      oShellLink.WindowStyle = 1
      oShellLink.Hotkey = "Ctrl+Alt+f"
      oShellLink.IconLocation = "notepad.exe, 0"
      oShellLink.Description = "Shortcut Script"
      oShellLink.WorkingDirectory = strDesktop
      oShellLink.Arguments = "C:\myFile.txt"
      oShellLink.Save
      
      Set oLink = WSHShell.CreateShortcut(strDirectory & "\Shortcut Text.lnk")
      oLink.TargetPath = ServerPath & "\ApplicationName.exe /Parameter"
      oLink.WorkingDirectory = ServerPath
      oLink.WindowStyle = 4
      oLink.Save

 

Aucun commentaire

 

Laissez un commentaire