1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

ショートカットファイル作成(Windows *.lnkファイル、VB script 利用で)

Last updated at Posted at 2016-11-09

こんにちは。
Google Chrome へのショートカットファイルを作成する方法を考えてみました(Windows OS の *.lnkファイルです)。

下記内容を VB script のファイルとして保存し、そのファイル(のアイコン)をダブルクリックして実行させれば、目的とするショートカットファイルがデスクトップに作成されます

shortcut.vbs
'このファイル(のアイコン)をダブルクリックして実行させます。
'create a short cut of Google Chrome exe by using VB script
Set fso = CreateObject("Scripting.FileSystemObject")
Set ws  = CreateObject("WScript.Shell")
desktop = ws.SpecialFolders("Desktop")
Set shortcut = ws.CreateShortcut(desktop & "\chrome.lnk")
With shortcut
  .TargetPath = """C:\Program Files\Google\Chrome\Application\chrome.exe"""
  .Arguments  = "--allow-file-access-from-files --disable-web-security --user-data-dir --enable-easy-off-store-extension-install"
  .WorkingDirectory = desktop
  .Save
End With

なおこちらに情報がまとめられています。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?