#author("2021-12-21T07:46:31+00:00","default:admin","admin")
#author("2021-12-22T04:43:10+00:00","default:admin","admin")
**ショートカット作成 [#w3bbeaa4]
-[[スクリプト ホストを使用してデスクトップ ショートカットをWindowsする方法:https://docs.microsoft.com/ja-jp/troubleshoot/windows-client/admin-development/create-desktop-shortcut-with-wsh]]
-[[PowerShell でショートカットを作る:http://www.vwnet.jp/windows/PowerShell/CreateShortcutByPowerShell.htm]]
-[[PowerShellを使用してショートカットを作成する方法:https://www.webdevqa.jp.net/ja/powershell/powershell%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%A6%E3%82%B7%E3%83%A7%E3%83%BC%E3%83%88%E3%82%AB%E3%83%83%E3%83%88%E3%82%92%E4%BD%9C%E6%88%90%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95/941785948/]]
-[[ショートカット(lnk)の作成:https://yanor.net/wiki/?PowerShell/%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E4%BD%9C%E6%88%90/%E3%82%B7%E3%83%A7%E3%83%BC%E3%83%88%E3%82%AB%E3%83%83%E3%83%88%28lnk%29%E3%81%AE%E4%BD%9C%E6%88%90]]
-[[スクリプトをバッチでたたく方法:https://qiita.com/Kacy-Infra-Minzoku/items/2cad6544d0d61634e258]]

-[[バッチファイルからexeファイルへのショートカットを作成する:https://codeguides.site/questions/ja/346107/creating-a-shortcut-for-a-exe-from-a-batch-file]]
--ショートカットには、[管理者として実行]オプションなど、WScript.Shellで操作できない多くの設定があります。 
--これらはWin32インターフェース `IShellLinkDataList`を通してのみアクセス可能です。これは使うのが本当に面倒ですが、それは可能です。

-[[CreateShortcut:http://suyamasoft.blue.coocan.jp/PowerShell/Sample/CreateShortcut/index.html]]

-[[.lnkがプログラムで開くコンソールウィンドウの背景色を変更するにはどうすればよいですか?:https://qapicks.com/question/1620461-80bd6b6c7889]]

-PowerShellにはショートカットを作るコマンド等はないようなので、Wshを使う

*WshShell [#f902b5fe]
 $WshShell = New-Object -comObject WScript.Shell
 $Shortcut = $WshShell.CreateShortcut("$Home\Desktop\ColorPix.lnk")
 $Shortcut.TargetPath = "C:\Program Files (x86)\ColorPix\ColorPix.exe"
 $Shortcut.Save()

**WshShell [#a5346e76]
***CreateShortcut [#qd9ccaf8]
-[[第6回 WshShellオブジェクトの詳細(2):https://atmarkit.itmedia.co.jp/ait/articles/0409/17/news086_3.html]]
-[[ショートカットを作成する:https://dobon.net/vb/dotnet/file/createshortcut.html]]

-「管理者として実行」の設定を行う方法が見つからない



トップ   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS