Create Desktop Shortcut PowerShell Code
title: ## Contents
style: nestedList # TOC style (nestedList|inlineFirstLevel)
minLevel: 1 # Include headings from the specified level
maxLevel: 4 # Include headings up to the specified level
includeLinks: true # Make headings clickable
debugInConsole: false # Print debug info in Obsidian console
Overview
Sources:
- **
Code Snippet
$TargetFile = "$Env:SYSTEMROOT\System32\notepad.exe"
$ShortcutFile = "$Env:Public\Desktop\Notepad.lnk"
$Wsh = New-Object -ComObject WScript.Shell
$Shortcut = $Wsh.CreateShortcut($ShortcutFile)
$Shortcut.TargetPath = $TargetFile
$Shortcut.Save()
Details
About
This note is about …
See Also
Appendix
Note created on 2024-05-03 and last modified on 2024-05-03.
Backlinks
LIST FROM [[PowerShell - Create Desktop Shortcut]] AND -"CHANGELOG" AND -"04-RESOURCES/Code/PowerShell/PowerShell - Create Desktop Shortcut"
(c) No Clocks, LLC | 2024