【CryptDriveMount.vbs】(もちろん名前はテキトーでOK) Const KeyFilePath = "KeyData\TrueCrypt.key" Set Fs = WScript.CreateObject("Scripting.FileSystemObject") Set drvs=Fs.Drives For Each DriveInfo In drvs l=DriveInfo.DriveLetter fullPath = l & ":\" & KeyFilePath If Fs.FileExists(fullPath) Then MsgBox "キーファイル「" & fullPath & "」を使用して、" & chr(13) & "ドライブ「TrueCrypt」をマウントします", vbOKOnly, "TrueCryptマウント" Set WSHShell = WScript.CreateObject("WScript.Shell") WSHShell.Run """C:\Program Files\TrueCrypt\TrueCrypt.exe"" /v ""ボリュームファイルへのフルパス"" /l R /a /q /k " & fullPath WScript.Quit End If Next MsgBox "「TrueCrypt」マウント用キーファイルが見つかりません", vbOKOnly, "TrueCryptマウント失敗"