Skip to content

Instantly share code, notes, and snippets.

@Aimeast
Created April 5, 2013 15:27
Show Gist options
  • Save Aimeast/5320200 to your computer and use it in GitHub Desktop.
Save Aimeast/5320200 to your computer and use it in GitHub Desktop.
Click this VBscript in a BitLocker drive to lock it quicker.
' =====================================================================
' Version: 1.0
' Date: 2013-02-22
' Description:
' This script is for auto lock a unlocked BitLocker drive.
' Put this script in a BitLocker drive and run it to lock this drive.
' =====================================================================
On Error Resume Next
arg = "-lock " & Mid(Wscript.ScriptFullName, 1, 2) & " -ForceDismount"
Set oShell = CreateObject("Shell.Application")
oShell.ShellExecute "manage-bde.exe", arg, , "runas", 1
If Err.Number <> 0 Then MsgBox Err.Description
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment