Exemplo n.º 1
0
        private void btnDismount_Click(object sender, EventArgs e)
        {
            string drive  = txtDriveLetter.Text;
            string vcPath = @"C:\Program Files\VeraCrypt\VeraCrypt.exe";

            VeraCrypt.Drive mnt = new VeraCrypt.Drive(vcPath, drive);
            mnt.IsSilent = false;
            mnt.IsBeep   = true;

            int ret = mnt.Dismount(force: (chkForce.Checked ? true : false));

            MessageBox.Show("Ret: " + ret);
        }
Exemplo n.º 2
0
        private void btnMount_Click(object sender, EventArgs e)
        {
            // var cmd = "VeraCrypt.exe -ArugmentList '/l [DriveLetter]', '/v [pathName]', '/q', '/m ts'";
            string drive    = txtDriveLetter.Text;
            string vcPath   = @"C:\Program Files\VeraCrypt\VeraCrypt.exe";
            string hcPath   = @"";
            string password = "";

            VeraCrypt.Drive mnt = new VeraCrypt.Drive(vcPath, drive, hcPath, password);
            mnt.IsSilent = false;

            int ret = mnt.Mount();

            MessageBox.Show("Ret: " + ret);
        }