add veracrypt automount
This commit is contained in:
1 parent
f017cd5d8b
commit
cc069f63ef
1 file changed
+21
-1
@@ -7,12 +7,26 @@ REM SMB Freigaben von bfds und xcopy.
|
||||
REM **************************************************
|
||||
SETLOCAL
|
||||
|
||||
|
||||
REM **************************************************
|
||||
REM Einbinden der Veracrypt Partition
|
||||
REM **************************************************
|
||||
echo Festplatte NASOFFSITE1 wird entschlüsselt und eingebunden
|
||||
SET VOLUME_LABEL=NASOFFSITE1
|
||||
SET VERACRYPT_PATH="C:\Program Files\VeraCrypt\VeraCrypt.exe"
|
||||
SET VOLUME_MOUNT_PATH="B:\"
|
||||
SET VOLUME_PASSWORD=123456
|
||||
REM get the Password for the volume from the user
|
||||
SET /P VOLUME_PASSWORD=Bitte geben Sie das Passwort für die Festplatte %VOLUME_LABEL% ein:
|
||||
%VERACRYPT_PATH% /q /v "\Device\Harddisk2\Partition1" /l B /p "%VOLUME_PASSWORD%"
|
||||
|
||||
SET SOURCE=\\bfds
|
||||
SET DESTINATION="B:\\"
|
||||
|
||||
echo Festplatte NASOFFSITE1 wird gesucht
|
||||
IF NOT EXIST %DESTINATION% (
|
||||
echo Festplatte NASOFFSITE1 nicht gefunden, bitte in Veracrypt als LAufwerk B:\ einbinden!
|
||||
echo Festplatte NASOFFSITE1 nicht gefunden, bitte in Veracrypt als Laufwerk B:\ einbinden!
|
||||
PAUSE
|
||||
exit /B
|
||||
)
|
||||
|
||||
@@ -29,6 +43,7 @@ REM Funktion zum Ausführen von robocopy
|
||||
SET COPYPATH=%~1
|
||||
IF NOT EXIST %SOURCE%\%COPYPATH% (
|
||||
echo Quelle nicht gefunden! Bitte öffne die SMB Freigbe: %SOURCE%\%COPYPATH%
|
||||
PAUSE
|
||||
exit /B %ERRORLEVEL%
|
||||
)
|
||||
SET SCRIPT_PATH=%~dp0
|
||||
@@ -48,3 +63,8 @@ REM Funktion zum Ausführen von robocopy
|
||||
REM /TEE: Protokolliert den Kopiervorgang auch in der Konsole
|
||||
GOTO :EOF
|
||||
REM **************************************************
|
||||
|
||||
REM **************************************************
|
||||
REM Partiton wieder aushängen
|
||||
REM **************************************************
|
||||
%VERACRYPT_PATH% /d B /q
|
||||
Reference in new issue
Block a user