Créer un raccourci en commande avec PowerShell

# Le programme
$ProgramPath = "C:\Program Files\Mozilla Firefox\firefox.exe"

# Création de l'objet Shell qui va nous permettre de créer le fichier .lnk
$WScriptObj = New-Object -ComObject ("WScript.Shell")

# Création du raccourci avec le chemin du fichier .lnk
$shortcut = $WscriptObj.CreateShortcut("C:\Users\Ronan\Desktop\Navigateur Firefox.lnk")

# Propriété cible du raccourci - Le programme à démarrer
$shortcut.TargetPath = $ProgramPath

# Sauve le raccourci
$shortcut.Save()

Commentaires

  1. Sega Megadrive | How many is the game
    In Sega's case the Sega Megadrive was released in 카지노사이트 the year 1988, and subsequently on the SEGA Genesis in 1990, casinosites Sega decided to release a few games for the

    RépondreSupprimer

Enregistrer un commentaire