Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

diskpart

Posted on 2011-03-17
3
Medium Priority
?
1,080 Views
Last Modified: 2012-05-11
Hello
I am trying to run a .bat that will open the diskpart utility and list the disks on the system.
My .bat contains the following


start diskpart /s f:\list.txt

list.txt contains the following

list disk



my problem is that the diskpart utility opens reads the command from the .txt file runs the command but then the diskpart wimdow quickly flashes the disks on the system and immediatly closes.  I would like it to stay opn.  Whan am I missing here?
0
Comment
Question by:TonyElam
3 Comments
 
LVL 6

Assisted Solution

by:dave_it
dave_it earned 100 total points
ID: 35159577
You need to run the batch file in a command prompt window.
0
 
LVL 8

Accepted Solution

by:
subhashchy earned 1900 total points
ID: 35159607
use below
 
start cmd /k diskpart /s f:\list.txt

Open in new window


0
 

Author Closing Comment

by:TonyElam
ID: 35159676
thank you both very very much Subhashchy your solution was the perfect most complete fit.
Thank you also dave it you put me on the right path
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

VALIDATING DATES One method of validating dates is to jam the date into the DATE command and see if it accepts it by examining the system's errorlevel value. A non-zero result indicates failure. A typical example might look something like the fol…
I have written articles previously comparing SARDU and YUMI.  I also included a couple of lines about Easy2boot (easy2boot.com).  I have now been using, and enjoying easy2boot as my sole multiboot utility for some years and realize that it deserves …
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

885 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question