Win32 app installed desktop shortcut with no custom icon
I’m installing a desktop shortcut to all my endpoints. I’m installing it as a win32 app with this script.
#Create directory to hold icon file and copy file there
New-Item -Path “c:” -Name “scut” -ItemType “directory” -Force
Copy-Item “S:ShortcutsUKGi.ico” -Destination “c:scutUKGi.ico”
#Shortcut creation and specify settings
$Shell = New-Object -ComObject (“WScript.Shell”)
$ShortCut = $Shell.CreateShortcut(“C:userspublicdesktopUKG Time.lnk”)
$ShortCut.TargetPath=”———————————————- “
#$Shortcut.Arguments=”———————————————- “
$ShortCut.IconLocation = “c:scutUKGi.ico”;
$ShortCut.Description = “UKG Time”;
$ShortCut.Save()
I already have a s: drive mapped to all my endpoints and I’m creating a folder on the c: drive of the destination pcs. I’m copying the ico file from the mapped drive to the c: drive then installing the shortcut. The desktop shortcut is created just fine. I just don’t get the custom icon. The install behavior is via system. I went into the app and added the custom icon jpg as the logo of the app itself. Still no luck with the custom icon. Any suggestions?