{"id":180,"date":"2018-12-05T20:00:14","date_gmt":"2018-12-05T19:00:14","guid":{"rendered":"https:\/\/www.mosi.at\/ikt\/?p=180"},"modified":"2019-10-12T17:06:05","modified_gmt":"2019-10-12T15:06:05","slug":"veracrypt-batch-zum-mount-dismount-einer-verschluesselten-veracrypt-datei","status":"publish","type":"post","link":"https:\/\/www.mosi.at\/ikt\/2018\/12\/05\/veracrypt-batch-zum-mount-dismount-einer-verschluesselten-veracrypt-datei\/","title":{"rendered":"VeraCrypt Batch zum mount\/dismount einer verschl\u00fcsselten VeraCrypt-Datei"},"content":{"rendered":"\n<div class=\"wp-block-image\"><figure class=\"alignleft\"><img decoding=\"async\" src=\"https:\/\/www.mosi.at\/ikt\/wp-content\/uploads\/2018\/12\/veracrypt_cmd\/VeraCrypt_CMD_Symbol_01.png\" alt=\"\" class=\"wp-image-512\"\/><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Wird eine mit VeraCrypt verschl\u00fcsste Datei oft ein- oder ausgeh\u00e4ngt, so besteht das Bed\u00fcrfnis per Klick und Eingabe des Passwortes das zu erm\u00f6glichen. Der folgende Batch f\u00fchrt das durch. Er mountet (h\u00e4ngt ein) und weist immer den selben Laufwerksbuchstaben dabei zu. Ist das Laufwerk bereits vorhanden, wird es dismoutet (ausgeh\u00e4ngt). Das wird ganze wird farblich hinterlegt und das Fenster schlie\u00dft dich automatisch.<br><br>Der Laufwerksbuchstabe, der Verzeichnispfad und die veracrypt-verschl\u00fcsselte Datei werden dabei am Beginn des Batchscritps Vatiablen zugewiesen.<br><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Beispiel f\u00fcr richtige Eingabe des Passwortes zum Einh\u00e4ngen \/ mounten der Datei ganzgeheim.hc als Laufwerks X:\\<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.mosi.at\/ikt\/wp-content\/uploads\/2018\/12\/veracrypt_cmd\/VeraCrypt_CMD_01.png\" alt=\"\" class=\"wp-image-434\"\/><figcaption>Passwort f\u00fcr die Datei ganzgeheim.hc eingeben<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.mosi.at\/ikt\/wp-content\/uploads\/2018\/12\/veracrypt_cmd\/VeraCrypt_CMD_02.png\" alt=\"\" class=\"wp-image-435\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.mosi.at\/ikt\/wp-content\/uploads\/2018\/12\/veracrypt_cmd\/VeraCrypt_CMD_03.png\" alt=\"\" class=\"wp-image-436\"\/><figcaption>Passwort wird nach Eingabe zu ******<br><\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.mosi.at\/ikt\/wp-content\/uploads\/2018\/12\/veracrypt_cmd\/VeraCrypt_CMD_04.png\" alt=\"\" class=\"wp-image-437\"\/><figcaption>die Datei ganzgeheim.hc ist als Laufwerk X eingeh\u00e4ngt \/ gemountet<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Beispiel zum Aush\u00e4ngen \/ dimount der Datei ganzgeheim.hc als Laufwerks X:\\<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.mosi.at\/ikt\/wp-content\/uploads\/2018\/12\/veracrypt_cmd\/VeraCrypt_CMD_dismout-01.png\" alt=\"\" class=\"wp-image-438\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Beispiel f\u00fcr richtige Eingabe eines falschen Passwortes zum Einh\u00e4ngen \/ mounten der Datei ganzgeheim.hc als Laufwerks X:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.mosi.at\/ikt\/wp-content\/uploads\/2018\/12\/veracrypt_cmd\/VeraCrypt_CMD_01.png\" alt=\"\" class=\"wp-image-434\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.mosi.at\/ikt\/wp-content\/uploads\/2018\/12\/veracrypt_cmd\/VeraCrypt_CMD_falschesPasswort-01.png\" alt=\"\" class=\"wp-image-439\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.mosi.at\/ikt\/wp-content\/uploads\/2018\/12\/veracrypt_cmd\/VeraCrypt_CMD_falschesPasswort-02.png\" alt=\"\" class=\"wp-image-440\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.mosi.at\/ikt\/wp-content\/uploads\/2018\/12\/veracrypt_cmd\/VeraCrypt_CMD_falschesPasswort-03.png\" alt=\"\" class=\"wp-image-441\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.mosi.at\/ikt\/wp-content\/uploads\/2018\/12\/veracrypt_cmd\/VeraCrypt_CMD_01.png\" alt=\"\" class=\"wp-image-434\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Der Code der Batch-Datei mount-x.bat:<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">@echo off\nREM das ist die Mount-X.bat Datei\nset lw=X\nREM cryptpath muss mit einem \\ enden. ZB. (D:\\Daten)\nREM cryptfile ein Dateiname. ZB (ganzgeheim.hc)\nREM Das Beginnende und das Endende \" werden automatisch ergaenzt.\nREM Daraus wird in cryptpf \"D:\\Daten\\ganzgeheim.hc\"\nset cryptpath=S:\\DatenCrypt\\\nset cryptfile=ganzgeheim.hc\nset cryptpf=\"%cryptpath%%cryptfile%\"\ncls &amp;&amp; mode con: cols=100 Lines=10 &amp;&amp; color E0 &amp;&amp; TITLE VeraCrypt: %cryptfile% Mount\/Dismount to %LW% > NUL\nIF NOT EXIST %LW%:\\ GOTO einhaengen\nIF EXIST %LW%:\\ GOTO aushaengen\n\n:einhaengen\ncls\ncolor E0\nset \/p password= Passwort fuer Festplatte %LW%:\\ eingeben :\ncls\necho Passwort fuer Festplatte %LW%:\\ eingeben :**\necho Festplatte %LW%:\\ einhaengen\u2026\n\"C:\\Program Files\\VeraCrypt\\VeraCrypt.exe\" \/q \/s \/V %cryptpf% \/l %LW% \/p %password%\nIF NOT EXIST %LW%:\\ GOTO passfalsch\nREM Passwort war richtig\ncolor 5F\necho.\necho Festplatte %LW%:\\ ist bereit\ntimeout 5\nexit\n\n:passfalsch\ncolor C0\necho.\necho Passwort war falsch!\necho Festplatte %LW%:\\ nicht eingehaengt\ntimeout 10\ngoto einhaengen\nexit\n\n:aushaengen\necho Festplatte %LW%:\\ aushaengen\u2026\n\"c:\\Program Files\\VeraCrypt\\VeraCrypt.exe\" \/q \/d %LW%\necho.\necho Festplatte %LW%:\\ ist ausgehaengt\ncolor 9F\ntimeout 5\nexit <\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Eigenschaften des Verkn\u00fcfungssymbols<\/strong><\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"alignleft\"><img decoding=\"async\" src=\"https:\/\/www.mosi.at\/ikt\/wp-content\/uploads\/2018\/12\/veracrypt_cmd\/VeraCrypt_CMD_Symbol_02_Eigenschaften-Verknuepfung.png\" alt=\"\" class=\"wp-image-516\"\/><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><br><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"alignleft\"><img decoding=\"async\" src=\"https:\/\/www.mosi.at\/ikt\/wp-content\/uploads\/2018\/12\/veracrypt_cmd\/VeraCrypt_CMD_Symbol_03_Eigenschaften-AnderesSymbol.png\" alt=\"\" class=\"wp-image-514\"\/><\/figure><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Wird eine mit VeraCrypt verschl\u00fcsste Datei oft ein- oder ausgeh\u00e4ngt, so besteht das Bed\u00fcrfnis per Klick und Eingabe des Passwortes das zu erm\u00f6glichen. Der folgende Batch f\u00fchrt das durch. Er mountet (h\u00e4ngt ein) und weist immer den selben Laufwerksbuchstaben dabei zu. Ist das Laufwerk bereits vorhanden, wird es dismoutet (ausgeh\u00e4ngt). Das wird ganze wird farblich [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ocean_front_end_style_editor":"no","ocean_post_layout":"","ocean_both_sidebars_style":"","ocean_both_sidebars_content_width":0,"ocean_both_sidebars_sidebars_width":0,"ocean_sidebar":"0","ocean_second_sidebar":"0","ocean_disable_margins":"enable","ocean_add_body_class":"","ocean_shortcode_before_top_bar":"","ocean_shortcode_after_top_bar":"","ocean_shortcode_before_header":"","ocean_shortcode_after_header":"","ocean_has_shortcode":"","ocean_shortcode_after_title":"","ocean_shortcode_before_footer_widgets":"","ocean_shortcode_after_footer_widgets":"","ocean_shortcode_before_footer_bottom":"","ocean_shortcode_after_footer_bottom":"","ocean_display_top_bar":"default","ocean_display_header":"default","ocean_header_style":"","ocean_center_header_left_menu":"0","ocean_custom_header_template":"0","ocean_custom_logo":0,"ocean_custom_retina_logo":0,"ocean_custom_logo_max_width":0,"ocean_custom_logo_tablet_max_width":0,"ocean_custom_logo_mobile_max_width":0,"ocean_custom_logo_max_height":0,"ocean_custom_logo_tablet_max_height":0,"ocean_custom_logo_mobile_max_height":0,"ocean_header_custom_menu":"0","ocean_menu_typo_font_family":"0","ocean_menu_typo_font_subset":"","ocean_menu_typo_font_size":0,"ocean_menu_typo_font_size_tablet":0,"ocean_menu_typo_font_size_mobile":0,"ocean_menu_typo_font_size_unit":"px","ocean_menu_typo_font_weight":"","ocean_menu_typo_font_weight_tablet":"","ocean_menu_typo_font_weight_mobile":"","ocean_menu_typo_transform":"","ocean_menu_typo_transform_tablet":"","ocean_menu_typo_transform_mobile":"","ocean_menu_typo_line_height":0,"ocean_menu_typo_line_height_tablet":0,"ocean_menu_typo_line_height_mobile":0,"ocean_menu_typo_line_height_unit":"","ocean_menu_typo_spacing":0,"ocean_menu_typo_spacing_tablet":0,"ocean_menu_typo_spacing_mobile":0,"ocean_menu_typo_spacing_unit":"","ocean_menu_link_color":"","ocean_menu_link_color_hover":"","ocean_menu_link_color_active":"","ocean_menu_link_background":"","ocean_menu_link_hover_background":"","ocean_menu_link_active_background":"","ocean_menu_social_links_bg":"","ocean_menu_social_hover_links_bg":"","ocean_menu_social_links_color":"","ocean_menu_social_hover_links_color":"","ocean_disable_title":"default","ocean_disable_heading":"default","ocean_post_title":"","ocean_post_subheading":"","ocean_post_title_style":"","ocean_post_title_background_color":"","ocean_post_title_background":0,"ocean_post_title_bg_image_position":"","ocean_post_title_bg_image_attachment":"","ocean_post_title_bg_image_repeat":"","ocean_post_title_bg_image_size":"","ocean_post_title_height":0,"ocean_post_title_bg_overlay":0.5,"ocean_post_title_bg_overlay_color":"","ocean_disable_breadcrumbs":"default","ocean_breadcrumbs_color":"","ocean_breadcrumbs_separator_color":"","ocean_breadcrumbs_links_color":"","ocean_breadcrumbs_links_hover_color":"","ocean_display_footer_widgets":"default","ocean_display_footer_bottom":"default","ocean_custom_footer_template":"0","osp_disable_panel":"default","osh_disable_topbar_sticky":"default","osh_disable_header_sticky":"default","osh_sticky_header_style":"default","osh_sticky_header_effect":"","osh_custom_sticky_logo":0,"osh_custom_retina_sticky_logo":0,"osh_custom_sticky_logo_height":0,"osh_background_color":"","osh_links_color":"","osh_links_hover_color":"","osh_links_active_color":"","osh_links_bg_color":"","osh_links_hover_bg_color":"","osh_links_active_bg_color":"","osh_menu_social_links_color":"","osh_menu_social_hover_links_color":"","ocean_post_oembed":"","ocean_post_self_hosted_media":"","ocean_post_video_embed":"","ocean_link_format":"","ocean_link_format_target":"self","ocean_quote_format":"","ocean_quote_format_link":"post","ocean_gallery_link_images":"off","ocean_gallery_id":[],"footnotes":""},"categories":[9,11,19,18,10,16],"tags":[],"class_list":["post-180","post","type-post","status-publish","format-standard","hentry","category-__news","category-betriebssysteme","category-cmd","category-scripts","category-software","category-windows","entry"],"_links":{"self":[{"href":"https:\/\/www.mosi.at\/ikt\/wp-json\/wp\/v2\/posts\/180","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mosi.at\/ikt\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mosi.at\/ikt\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mosi.at\/ikt\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mosi.at\/ikt\/wp-json\/wp\/v2\/comments?post=180"}],"version-history":[{"count":0,"href":"https:\/\/www.mosi.at\/ikt\/wp-json\/wp\/v2\/posts\/180\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.mosi.at\/ikt\/wp-json\/wp\/v2\/media?parent=180"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mosi.at\/ikt\/wp-json\/wp\/v2\/categories?post=180"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mosi.at\/ikt\/wp-json\/wp\/v2\/tags?post=180"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}