Skip to content
Menu
TechFacts007.in
  • Information Zone
  • Reviews
    • Apps Reviews
    • PC’s
  • Gadgets
  • Hosting
    • Domain and Hosting
      • cPanel
    • WordPress
  • More
    • Tech Facts
    • Tips & Tricks
TechFacts007.in
Hard Disk Image
July 28, 2018October 5, 2020

Mount and Unmount Virtual Hard Disk (CMD Command and batch File Method)

There are several methods for creating a Virtual Hard Disk in PC and also there are many methods that are available in our PC for Mount and Unmount of a VHD.

 

Read More About Virtual Hard Disk.

In This Topic, we are discussing some methods for Mount and Unmount. 

Method 1: Disk Management


Step 1: Open Disk Management Window. (Click here to View Steps – please view only step 1 for opening Disk Management)

 

Step 2: Click on Action on the upper left side and then click on Attach VHD.

 

Step 3: Click On Browse and then Navigate to the Virtual Hard Disk Location.

 

Step 4: When VHD loaded, click on OK. (Your Virtual Hard Disk Will Automatically Mounted)

 

Method 2: Batch File


In this method you have to create a Dos Command file, that will automatically Mount your Virtual Hard Disk.

 

Step 1: Open any text editor app (Notepad or Notepad++)

 

Step 2 : (For Mounting the VHD) Type Code : 

@ECHO OFF
TITLE Mount VHD by Techfacts007.in
ECHO Mount VHD
ECHO Written by: Shanu Raj
ECHO TechFacts007.in
ECHO.
ECHO.SETLOCALSET DiskPartScript="%TEMP%\DiskpartScript.txt"ECHO SELECT VDISK FILE="%~1" > %DiskPartScript%
ECHO ATTACH VDISK >> %DiskPartScript%DiskPart /s %DiskPartScript%ENDLOCAL

 

Click on the download button to download the VHD Mounting script.

Download Now

 

(For Unmounting the VHD) Type Code : 

@ECHO OFF
TITLE Unmount VHD
ECHO Unmount VHD
ECHO Written by: Shanu Raj
ECHO TechFacts007.in
ECHO.
ECHO.SETLOCALSET DiskPartScript="%TEMP%\DiskpartScript.txt"ECHO SELECT VDISK FILE="%~1" > %DiskPartScript%
ECHO DETACH VDISK >> %DiskPartScript%DiskPart /s %DiskPartScript%ENDLOCAL

 

Click on the download button to download the VHD Unmounting script.

Download Now

 

Step 3 : Save This code with .bat extension. 

  • Example 1: Mount.bat
  • Example 2: Unmount.bat

Please Note That The First Code Is For Mounting The VHD And The Second Code Is For Unmounting The VHD. Save These Codes Separately.

 

Step 4 : Copy These 2 Files To : 

C:/Users/Admin/ AppData/Roaming/ Microsoft/Windows/ SendTo/

Here The Text Admin belongs to the User Account Name.

 

Step 5: When these steps are complete. Go to the VHD file location and right-click on that and click on Send to and select Mount.bat or select your Mount batch file.

VHD Mount

Follow Step 5 For Unmounting. Just Select The Unmounting Script File.

Post Views: 1,506

4 thoughts on “Mount and Unmount Virtual Hard Disk (CMD Command and batch File Method)”

  1. Noway says:
    February 11, 2021 at 2:34 PM

    Wanna reinstall windows while at it?

    Reply
    1. Admin says:
      November 26, 2021 at 11:00 AM

      no need to reinstall windows.

      Reply
  2. James says:
    June 17, 2021 at 12:16 PM

    I still dont understand this

    I have windows 10 – I have the vhdmount.exe command:

    Please help me mount this file in the absolute path:

    H:\SanDiskSSD.VHDX

    Reply
    1. Admin says:
      November 26, 2021 at 10:59 AM

      You can follow method 1 from our article.
      Method 1 is direct from Disk Management tool.

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Trending

  • Tech Facts
    52.376552,5.198303(Dead Body Found) Google Map
  • Information Zone
    Create Sitemap for React.Js Web App – Sitemap.xml for react app
  • Information Zone, Programming Languages, Tutorials
    React Hook To Check If User Has Changed/Minimize the Browser Tab
  • Codes, Programming Languages
    Find out if you can reach the last tile – Program Code
  • How to, Information Zone, Tips & Tricks
    Encrypt Javascript and CSS Code – Hide Original Code from Users
  • Tech Facts
    In 1956, 5 megabytes (5MB) of data weighed a Ton.
  • How to, Information Zone, Tips & Tricks
    Download any paid Software. Get any software free for lifetime
  • PC's, Tips & Tricks
    Mount and Unmount Virtual Hard Disk (CMD Command and batch File Method)

Recent Posts

  • Worker Threads in JavaScript: Enhancing Performance with Parallelism July 31, 2023
  • Create Sitemap for React.Js Web App – Sitemap.xml for react app May 27, 2023
  • The Importance of Sitemap.xml: Enhancing Website Visibility and SEO May 27, 2023
  • Web Page Generation – Difference between SSR, CSR and SSG May 26, 2023
  • React.js vs. Next.js – Choosing the Right Framework for Your Web Development Needs May 26, 2023
  • NGINX vs. Apache: Exploring the Differences and Choosing the Right Web Server May 21, 2023
  • Setting Up NGINX on Ubuntu Server and Activating a Domain on NGINX Server May 21, 2023
  • Functional Component vs Class Component in React.Js January 18, 2023
  • React.Js Lifecycle Methods January 18, 2023
  • What is componentDidMount and useEffect with Example January 18, 2023

Categories

  • Apps Reviews (4)
  • Gadgets (4)
  • Hack With Us (2)
  • Hosting (12)
    • Domain and Hosting (7)
      • cPanel (5)
    • Wordpress (5)
  • How to (11)
  • Information Zone (65)
  • PC's (7)
  • Product Reviews (11)
  • Programming Languages (11)
    • Codes (5)
    • Tutorials (6)
  • Smart Phones (8)
  • Tech Facts (13)
  • Tips & Tricks (13)

Browse By Date

September 2023
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  
« Jul    

More

Contact Us
Privacy Policy
About Us
About Admin

Advertisement

Other Sites

ShanuTheWebDev.in
QrCode.ShanuTheWebDev.in
©2023 TechFacts007.in | Powered by WordPress and Superb Themes!