'------------------------------------------------------- ' 全てのネットワークドライブを切断してシャットダウンする ' (C) 1999-2000 Windows98.FAQ ' http://homepage2.nifty.com/winfaq/ '------------------------------------------------------- Set WshNetwork = WScript.CreateObject("WScript.Network") Set WshShell = WScript.CreateObject("WScript.Shell") msgrc = Msgbox("Windows を終了してもいいですか?",vbYesNo,"Windows の終了") If msgrc = vbYes Then Set objDrives = WshNetwork.EnumNetworkDrives For i = 0 to objDrives.Count -1 Step 2 WshNetwork.RemoveNetworkDrive objDrives.Item(i) Next WshShell.Run ("rundll32 Shell32.dll,SHExitWindowsEx 1") End if