Add success message for created shortcuts

This commit is contained in:
Richard Kuhnt
2017-04-18 21:45:06 +02:00
parent 9b9a2e3289
commit 2ff4eaaafc
+2 -1
View File
@@ -13,7 +13,7 @@ function shortcut_folder() {
function startmenu_shortcut($target, $shortcutName) {
if(!(Test-Path $target)) {
Write-Host -f DarkRed "Can't create the Startmenu shortcut for $(fname $target): Couldn't find $target"
Write-Host -f DarkRed "Can't create a Startmenu shortcut for $(fname $target): Couldn't find $target"
return
}
$scoop_startmenu_folder = shortcut_folder
@@ -24,6 +24,7 @@ function startmenu_shortcut($target, $shortcutName) {
$wsShell = $wsShell.CreateShortcut("$scoop_startmenu_folder\$shortcutName.lnk")
$wsShell.TargetPath = "$target"
$wsShell.Save()
success "Created a Startmenu shortcut for $(fname $target)"
}
# Removes the Startmenu shortcut if it exists