Created
April 22, 2021 06:56
-
-
Save mu88/61760f56bbf93faca5ee2d54893623bb to your computer and use it in GitHub Desktop.
Combines KeePass and VeraCrypt for volume mounting
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$KPScriptEXE = "C:\Program Files (x86)\KeePass Password Safe 2\KPScript.exe" | |
$KeePassFile = "C:\Users\me\Documents\me.kdbx" | |
$VeraCryptEXE = "C:\Program Files\VeraCrypt\VeraCrypt.exe" | |
$VeraCryptFile = "C:\Users\me\Documents\me.hc" | |
$VeraCryptEntryTitle = "VeraCrypt" | |
$output = & $KPScriptEXE -c:GetEntryString $KeePassFile -Field:Password -ref-Title:$VeraCryptEntryTitle -guikeyprompt | |
$pw = ($output -split '\n')[0] | |
$pw = $pw -replace "`n","" -replace "`r","" | |
& $VeraCryptEXE /q /v $VeraCryptFile /l u /p $pw |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment