I want to create a batch file to activate a partition. Idea is to create two such batch files to switch active partition. What I want to automate is the following commands:
diskpart
list disk
select disk 0
list partition
select partition 1
active
Help is appreciated.
Edit: The problem has been resolved. For those who might be interested, the solution is as follows:
Create a batch file named as Batchfile for example, and a text file named as Script for example.
Enter a statement in the Batchfile.bat as follows:
Enter statements in the Script.txt as follwos:
Then, save the two files in a same folder.
Another set of files as above need be created to activate partition 2.
Note that one needs to know the disk number and the partition number to be used in the Script.txt for his/her situation. They can be determined by using Disk Management(Computer->manage->Disk Management).
diskpart
list disk
select disk 0
list partition
select partition 1
active
Help is appreciated.
Edit: The problem has been resolved. For those who might be interested, the solution is as follows:
Create a batch file named as Batchfile for example, and a text file named as Script for example.
Enter a statement in the Batchfile.bat as follows:
Code:
diskpart /s Script.txt
Code:
list disk
select disk 0
list partition
select partition 1
active
Another set of files as above need be created to activate partition 2.
Note that one needs to know the disk number and the partition number to be used in the Script.txt for his/her situation. They can be determined by using Disk Management(Computer->manage->Disk Management).
Last edited:
My Computer
- Computer type
- PC/Desktop
- OS
- W7 Ult x64, W8 Pro x64 and W10 Pro x64
- CPU
- Phenom FX6300
- Motherboard
- Gigabyte GA-970A-UD3 rev. 1.2
- Memory
- 16GB DDR3 1866 G.Skill F3-1866C9D-16GWM x2
- Graphics Card(s)
- Radeon R7 360
- Sound Card
- Asus Xonar DS
- Monitor(s) Displays
- 27" x2, Dell P2715Q
- Screen Resolution
- 3840 x 2160
- Hard Drives
- Samsung 850Pro 1TB SSD - system
Samsung 4TB SSD - Data
- PSU
- Corsair CX450M
- Case
- Corsair 200R
- Cooling
- Zalman CNPS5X Performa
- Internet Speed
- 400Mbps/12Mbps
- Other Info
- 2nd machine: Same as above
3rd machine: Apple MacAir with W7 Ult installed
I started using version 4.1 and now it is