Skip to content

Instantly share code, notes, and snippets.

@khayama-zz
Created March 15, 2021 02:21
Show Gist options
  • Save khayama-zz/cb07322b16743e6c0a77cb09347b1764 to your computer and use it in GitHub Desktop.
Save khayama-zz/cb07322b16743e6c0a77cb09347b1764 to your computer and use it in GitHub Desktop.
rem メモ帳のショートカットをデスクトップに作成
powershell -Command "&{$WsShell = New-Object -ComObject WScript.Shell; $Shortcut = $WsShell.CreateShortcut('C:¥Users¥Administrator¥Desktop¥memo.lnk'); $Shortcut.TargetPath = 'C:¥Windows¥System32¥notepad.exe'; $Shortcut.IconLocation = 'C:¥Windows¥System32¥notepad.exe'; $Shortcut.Save()}"
rem
rem コマンドプロンプトのショートカットをデスクトップに作成
powershell -Command "&{$WsShell = New-Object -ComObject WScript.Shell; $Shortcut = $WsShell.CreateShortcut('C:¥Users¥Administrator¥Desktop¥cmd.lnk'); $Shortcut.TargetPath = 'C:¥Windows¥System32¥cmd.exe'; $Shortcut.IconLocation = 'C:¥Windows¥System32¥cmd.exe'; $Shortcut.Save()}"
rem
rem コントロールパネルのショートカットをデスクトップに作成
powershell -Command "&{$WsShell = New-Object -ComObject WScript.Shell; $Shortcut = $WsShell.CreateShortcut('C:¥Users¥Administrator¥Desktop¥control.lnk'); $Shortcut.TargetPath = 'C:¥Windows¥System32¥control.exe'; $Shortcut.IconLocation = 'C:¥Windows¥System32¥control.exe'; $Shortcut.Save()}"
rem
rem リソースモニターのショートカットをデスクトップに作成
powershell -Command "&{$WsShell = New-Object -ComObject WScript.Shell; $Shortcut = $WsShell.CreateShortcut('C:¥Users¥Administrator¥Desktop¥resmon.lnk'); $Shortcut.TargetPath = 'C:¥Windows¥system32¥resmon.exe'; $Shortcut.IconLocation = 'C:¥Windows¥system32¥resmon.exe'; $Shortcut.Save()}"
rem
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment