'================================================================== ' Windows 10 の Quick Lanuch に「設定」ショートカットを作成しますYO! 'http://www10.plala.or.jp/palm84/wsh.html 'http://d.hatena.ne.jp/palm84/20150823/1440328044 'http://www10.plala.or.jp/palm84/archives/wsh/Win10_CreateMsSettingsShortCut_QL.vbs.txt '================================================================== 'Shell オブジェクトを作成 Set objShell = WScript.CreateObject("WScript.Shell") 'FileSystemObject オブジェクトを作成 Set objFSO = WScript.CreateObject("Scripting.FileSystemObject") Const Reg_ProductName = "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProductName" myOS = objShell.RegRead(Reg_ProductName) If Not InStr(myOS, "Windows 10") > 0 Then MsgBox "Windows 10 専用クマー (´;ω;`) ",48 ,"I am Sorry, ヒゲソ..(ry" WScript.Quit End If QuickLaunch = objShell.ExpandEnvironmentStrings("%APPDATA%\Microsoft\Internet Explorer\Quick Launch") '*** path *** 'appPath = objFSO.GetParentFolderName(WScript.ScriptFullName) myRoot = QuickLaunch & "\設定 (menu)" Content = objShell.ExpandEnvironmentStrings("%LOCALAPPDATA%\Packages\windows.immersivecontrolpanel_cw5n1h2txyewy\LocalState\Indexed\Settings\ja-JP\") MyKakunin If Not objFSO.FolderExists(myRoot) Then objFSO.CreateFolder(myRoot) End IF ReDim arrCategory(8) arrCategory(0) = "システム" arrCategory(1) = "デバイス" arrCategory(2) = "ネットワークとインターネット" arrCategory(3) = "パーソナル設定" arrCategory(4) = "アカウント" arrCategory(5) = "時刻と言語" arrCategory(6) = "簡単操作" arrCategory(7) = "プライバシー" arrCategory(8) = "更新とセキュリティ" For x = 0 To 8 dirCategory = myRoot & "\" & arrCategory(x) If Not objFSO.FolderExists(dirCategory) Then objFSO.CreateFolder(dirCategory) End If Next strFile = "%windir%\explorer.exe" strIcon = "%SystemRoot%\System32\shell32.dll, 315" '*** 設定 *** 'myFolder = QuickLaunch 'Title = "設定" 'strArguments = "shell:AppsFolder\Windows.ImmersiveControlPanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel" 'strWorkingDirectory = "" 'MySC '*** xxxxx *** Dim strTitle(99), strURI(99) '*** システム *** myFolder = myRoot & "\システム" strTitle(0) = "ディスプレイ" strURI(0) = "AAA_SettingsPagePCSystemDisplay" strTitle(1) = "通知と操作" strURI(1) = "AAA_SettingsPageAppsNotifications" strTitle(2) = "アプリと機能" strURI(2) = "AAA_SettingsGroupAppSizesList" strTitle(3) = "オプション機能の管理" strURI(3) = "AAA_SystemSettings_StorageSense_AppSizesOptionalComponentsLink" strTitle(4) = "マルチタスク" strURI(4) = "AAA_SettingsGroupVirtualDesktops" strTitle(5) = "タブレット モード" strURI(5) = "AAA_SettingsPagePCSystemShellMode" strTitle(6) = "バッテリー節約機能" strURI(6) = "AAA_SettingsPageBatterySaver" strTitle(7) = "バッテリーの使用状況" strURI(7) = "AAA_SystemSettings_BatterySaver_LandingPage_UsageDetailsLink" strTitle(8) = "バッテリー節約機能の設定" strURI(8) = "AAA_SystemSettings_BatterySaver_LandingPage_SettingsLink" strTitle(9) = "電源とスリープ" strURI(9) = "AAA_SettingsPageScreenPowerAndSleep" strTitle(10) = "ストレージ" strURI(10) = "AAA_SettingsPageStorageSenseStorageOverview" strTitle(11) = "オフライン マップ" strURI(11) = "AAA_SettingsPageMaps" strTitle(12) = "既定のアプリ" strURI(12) = "AAA_SettingsPageAppsDefaults" strTitle(13) = "バージョン情報" strURI(13) = "AAA_SettingsPagePCSystemInfo" For y = 0 to 13 If strTitle(y) <> "" Then Title = strTitle(y) strArguments = Content & strURI(y) & ".settingcontent-ms" MySC End If Next '*** デバイス *** myFolder = myRoot & "\デバイス" strTitle(14) = "プリンタとスキャナー" strURI(14) = "AAA_SettingsPageDevicesPrinters" strTitle(15) = "接続中のデバイス" strURI(15) = "AAA_SettingsPagePCSystemDevices" strTitle(16) = "Bluetooth" strURI(16) = "AAA_SettingsPagePCSystemBluetooth" strTitle(17) = "マウスとタッチパッド" strURI(17) = "AAA_SettingsPagePCSystemDeviceSettings" strTitle(18) = "自動再生" strURI(18) = "AAA_SettingsPagePCSystemAutoPlay" For y = 14 to 18 If strTitle(y) <> "" Then Title = strTitle(y) strArguments = Content & strURI(y) & ".settingcontent-ms" MySC End If Next '*** ネットワークとインターネット *** myFolder = myRoot & "\ネットワークとインターネット" strTitle(19) = "Wi-Fi" strURI(19) = "AAA_SettingsPageNetworkWiFi" 'strTitle(20) = "Wi-Fi設定を管理する" 'strURI(20) = "network-wifisettings" strTitle(21) = "機内モード" strURI(21) = "AAA_SettingsPageNetworkAirplaneMode" strTitle(22) = "データ使用状況" strURI(22) = "AAA_SettingsGroupDataSenseMainPageOverview" strTitle(23) = "VPN" strURI(23) = "AAA_SettingsPageNetworkVPN" strTitle(24) = "ダイヤルアップ" strURI(24) = "AAA_SettingsPageNetworkDialup" strTitle(25) = "イーサネット" strURI(25) = "AAA_SettingsPageNetworkEthernet" strTitle(26) = "プロキシ" strURI(26) = "AAA_SettingsPageNetworkProxy" For y = 19 to 26 If strTitle(y) <> "" Then Title = strTitle(y) strArguments = Content & strURI(y) & ".settingcontent-ms" MySC End If Next '*** パーソナル設定 *** myFolder = myRoot & "\パーソナル設定" strTitle(27) = "背景" strURI(27) = "AAA_SystemSettings_Personalize_Background_ChooseBackground" strTitle(28) = "色" strURI(28) = "AAA_SettingsPageColors" strTitle(29) = "ロック画面" strURI(29) = "AAA_SettingsPageLockScreen" strTitle(30) = "テーマ" strURI(30) = "AAA_SettingsPageThemes" strTitle(31) = "スタート" strURI(31) = "AAA_SettingsPageStart" For y = 27 to 31 If strTitle(y) <> "" Then Title = strTitle(y) strArguments = Content & strURI(y) & ".settingcontent-ms" MySC End If Next '*** アカウント *** myFolder = myRoot & "\アカウント" strTitle(32) = "お使いのアカウント" strURI(32) = "AAA_SettingsGroupYourAccount" strTitle(33) = "サインイン オプション" strURI(33) = "AAA_SettingsPageAccountsManage" strTitle(34) = "職場のアクセス" strURI(34) = "AAA_SettingsPageNetworkWorkplace" strTitle(35) = "家族とその他のユーザー" strURI(35) = "AAA_SettingsPageAccountsUsers" strTitle(36) = "設定の同期" strURI(36) = "AAA_SettingsPageAccountsSync" For y = 32 to 36 If strTitle(y) <> "" Then Title = strTitle(y) strArguments = Content & strURI(y) & ".settingcontent-ms" MySC End If Next '*** 時刻と言語 *** myFolder = myRoot & "\時刻と言語" strTitle(37) = "日付と時刻" strURI(37) = "AAA_SettingsPageTimeRegionDateTime" strTitle(38) = "地域と言語" strURI(38) = "AAA_SettingsPageTimeRegionLanguage" strTitle(39) = "音声認識" strURI(39) = "AAA_SettingsPageSpeech" For y = 37 to 39 If strTitle(y) <> "" Then Title = strTitle(y) strArguments = Content & strURI(y) & ".settingcontent-ms" MySC End If Next '*** 簡単操作 *** myFolder = myRoot & "\簡単操作" strTitle(40) = "ナレーター" strURI(40) = "AAA_SettingsPageEaseOfAccessNarrator" strTitle(41) = "拡大鏡" strURI(41) = "AAA_SettingsPageEaseOfAccessMagnifier" strTitle(42) = "ハイ コントラスト" strURI(42) = "AAA_SettingsPageEaseOfAccessHighContrast" strTitle(43) = "字幕" strURI(43) = "AAA_SettingsPageEaseOfAccessClosedCaptioning" strTitle(44) = "キーボード" strURI(44) = "AAA_SettingsPageEaseOfAccessKeyboard" strTitle(45) = "マウス" strURI(45) = "AAA_SettingsPageEaseOfAccessMouse" strTitle(46) = "その他のオプション" strURI(46) = "AAA_SettingsPageEaseOfAccessMoreOptions" For y = 40 to 46 If strTitle(y) <> "" Then Title = strTitle(y) strArguments = Content & strURI(y) & ".settingcontent-ms" MySC End If Next '*** プライバシー *** myFolder = myRoot & "\プライバシー" strTitle(47) = "全般" strURI(47) = "AAA_SettingsPagePrivacyGeneral" strTitle(48) = "位置情報" strURI(48) = "AAA_SettingsPagePrivacyLocation" strTitle(49) = "カメラ" strURI(49) = "AAA_SettingsPagePrivacyWebcam" strTitle(50) = "マイク" strURI(50) = "AAA_SettingsPagePrivacyMicrophone" strTitle(51) = "音声認識 手書き入力 タイピング" strURI(51) = "AAA_SettingsPagePrivacyPersonalization" strTitle(52) = "アカウント情報" strURI(52) = "AAA_SettingsPagePrivacyAccountInfo" strTitle(53) = "連絡先" strURI(53) = "AAA_SettingsPagePrivacyContacts" strTitle(54) = "カレンダー" strURI(54) = "AAA_SettingsPagePrivacyCalendar" strTitle(55) = "メッセージング" strURI(55) = "AAA_SettingsPagePrivacyMessaging" strTitle(56) = "無線" strURI(56) = "AAA_SettingsPagePrivacyRadios" strTitle(57) = "他のデバイス" strURI(57) = "AAA_SettingsPagePrivacyCustomPeripherals" strTitle(58) = "フィードバックと診断" strURI(58) = "AAA_SettingsPagePrivacySIUFSettings" 'strTitle(59) = "バック グラウンド アプリ" 'strURI(59) = "" For y = 47 to 59 If strTitle(y) <> "" Then Title = strTitle(y) strArguments = Content & strURI(y) & ".settingcontent-ms" MySC End If Next '*** 更新とセキュリティ *** myFolder = myRoot & "\更新とセキュリティ" strTitle(60) = "Windows Update" strURI(60) = "AAA_SettingsPageRestoreMusUpdate" strTitle(61) = "Windows Defender" strURI(61) = "AAA_SettingsPageWindowsDefender" strTitle(62) = "バックアップ" strURI(62) = "AAA_SettingsPageRestoreOneBackup" strTitle(63) = "回復" strURI(63) = "AAA_SettingsPageRestoreRestore" strTitle(64) = "ライセンス認証" strURI(64) = "AAA_SettingsPageActivate" strTitle(65) = "開発者向け" strURI(65) = "AAA_SettingsPageRestoreDeveloperOptions" For y = 60 to 65 If strTitle(y) <> "" Then Title = strTitle(y) strArguments = Content & strURI(y) & ".settingcontent-ms" MySC End If Next Kakunin = MsgBox ("終了です YO!", 64 ,"クマー! (´・ω・`) ") Set objShortcut = Nothing Set objFSO = Nothing Set objShell = Nothing '********************************************************* 'Sub MyKakunin '********************************************************* Sub MyKakunin Kakunin = MsgBox ("Quick Launch に設定ショートカットを作りますのん? (´・ω・`)", 65 ,"設定ショートカットを作るYO! (´・ω・`) ") If Kakunin = 2 Then WScript.Quit End If End Sub '********************************************************* 'Sub MySC '********************************************************* Sub MySC strShortCut = myFolder & "\" & Title & ".lnk" '*** ショートカットオブジェクトを作成 *** Set objShortCut = objShell.CreateShortcut(strShortCut) With objShortCut ' リンク先 .TargetPath = strFile ' 作業フォルダ .WorkingDirectory = strWorkingDirectory ' 引数 .Arguments = strArguments ' コメント .Description = "" ' アイコン .IconLocation = strIcon End With objShortCut.Save ''WScript.Echo strFileName & "にショートカットを作成しました。" 'MsgBox "ショートカットを作成しました YO!" & vbcrlf & vbcrlf & Title,64 ,"(´・ω・`) クマー! " End Sub