![]() ![]() ![]() The following code sample script will be use to delete the shortcut file during the uninstall process. This script will create the following shortcut file on the user desktop: Deleting shortcut script ![]() Tip: You can use the Icon stored on the executable file by using the following format: $Shortcut.WorkingDirectory = 'C:\Program Files\SAPIEN Technologies, Inc\Get-SystemInfo' $Shortcut.IconLocation = 'C:\Program Files\SAPIEN Technologies, Inc\Get-SystemInfo\Get-SystemInfo.exe,0' $Shortcut = $WScriptShell.CreateShortcut($ShortcutLocation) $WScriptShell = New-Object -ComObject WScript.Shell $ShortcutLocation = "$env:USERPROFILE\Desktop\Get-SystemInfo.lnk" $TargetPath = 'C:\Program Files\SAPIEN Technologies, Inc\Get-SystemInfo\Get-SystemInfo.exe' *Note: Make sure to provide the Icon informationīelow shows the code for creating the **shortcut file: # - Create a Shortcut in User Desktop:
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |