New
#1
Batch file to activate a partition
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:Code:diskpart /s Script.txt
Then, save the two files in a same folder.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 by churin; 01 May 2013 at 08:37. Reason: moved to new thread for better support