'================================================================== 'デスクトップとクイック起動の、シャットダウン・ログオフ・ロック のショートカットを削除しますYO! 'http://palm84.hatenablog.com/entry/20150508/1431028265 'http://d.hatena.ne.jp/palm84/20150823/1440328044 'http://d.hatena.ne.jp/palm84/20121028/1351419637 'http://www10.plala.or.jp/palm84/wsh.html 'http://www10.plala.or.jp/palm84/archives/wsh/Win8_DeleteShutdownIcon.vbs.txt 'https://eu7w9wsmf6a74xyjdfzl3q-on.drv.tw/archives/wsh/Win8_DeleteShutdownIcon.vbs.txt '================================================================== 'Shell オブジェクトを作成 Set objShell = WScript.CreateObject("WScript.Shell") 'FileSystemObject オブジェクトを作成 Set objFSO = WScript.CreateObject("Scripting.FileSystemObject") MyKakunin Dim strFile, strShortCut, strShortCut2 '*** 環境変数とか取得 *** Desktop = objShell.SpecialFolders("Desktop") QuickLaunch = objShell.ExpandEnvironmentStrings("%APPDATA%\Microsoft\Internet Explorer\Quick Launch") '*** シャットダウン *** Title = "シャットダウン" strFile = QuickLaunch & "\Windows_Shutdown_dialog.vbs" MyDeleteFile '*** ログオフ *** Title = "ログオフ" strFile = QuickLaunch & "\Windows_Logoff.vbs" MyDeleteFile '*** コンピューターをロック *** Title = "コンピューターをロック" strFile = QuickLaunch & "\Windows_Lock_station.vbs" MyDeleteFile '*** 詳細ブートオプション *** Title = "詳細ブートオプション" strFile = QuickLaunch & "\Win8_Reboot_option.vbs" MyDeleteFile MsgBox "終了です YO!" & vbcrlf & vbcrlf,64 ,"(´・ω・`) クマー! " Set objFSO = Nothing Set objShell = Nothing '********************************************************* 'Sub MyKakunin '********************************************************* Sub MyKakunin Kakunin = MsgBox ("シャットダウンアイコンを削除しますのん? (´・ω・`)", 49 ,"シャットダウンアイコンを削除するYO! (´・ω・`) ") If Kakunin = 2 Then WScript.Quit End If End Sub '********************************************************* 'Sub MyDeleteFile '********************************************************* Sub MyDeleteFile 'ファイルが存在するなら削除 If objFSO.FileExists(strFile) Then objFSO.DeleteFile(strFile) End If strShortCut = QuickLaunch & "\" & Title & ".lnk" strShortCut2 = Desktop & "\" & Title & ".lnk" 'ファイルが存在するなら削除 If objFSO.FileExists(strShortCut) Then objFSO.DeleteFile(strShortCut) End If If objFSO.FileExists(strShortCut2) Then objFSO.DeleteFile(strShortCut2) End If End Sub