Created
March 25, 2020 14:00
-
-
Save Wartz/0b2c2cc9b72ef7e8005a0ab5ae09aa2d to your computer and use it in GitHub Desktop.
Create a desktop shortcut in the Users\Public\Desktop folder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Ripped out of an installer script for CapIQ in SB 120 and 105 | |
## Insert your silent install commands here | |
# Create a desktop shortcut after the app is installed. | |
function set-shortcut { | |
param ( [string]$SourceLnk, [string]$DestinationPath ) | |
$WshShell = New-Object -comObject WScript.Shell | |
$Shortcut = $WshShell.CreateShortcut($SourceLnk) | |
$Shortcut.TargetPath = $DestinationPath | |
$Shortcut.Save() | |
} | |
# Replace the paths with <path to shortcut location> and <path to executable> | |
set-shortcut "C:\Users\Public\Desktop\Internet Explorer.lnk" "C:\Program Files\internet explorer\iexplore.exe" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment