Determining partition sizes & computer models

March 24, 2010 at 16:19:10
Specs: N/A
I'm working on building a script to use with WinPE to launch Ghost, and one of the parameters is to set the partition to put the image on to. It's not a problem if you're used to doing it manually and you know what partition it needs to go onto. The purpose of this script though is for people that may not have the familiarity with it to just put the correct partition in. My question is, is there a either a way to list the partitions on a hard drive for the user to select? Alternatively, a better more "hands off" approach would be for the script to automatically determine the largest partition and just use that one with Ghost.

My second part of this question is, is there an easy way to figure out what model computer you're using from within the script so that possibly I could forgo the user selecting which Ghost image to use? The computers I work with are Dell's and HP's, and they've been coming with Vista so far. This is helpful, because as of right now only the files in the folder containing the images are listed, not any description of them. There is an option to view the readme that has the description of the files, but it requires the user to read it carefully, and is not full proof.

Thanks for the help.

See More: Determining partition sizes & computer models

Report •

March 24, 2010 at 21:39:14
the ones i'm familiar with that you could capture data from:
diskpart (harder to deal with due to interactive nature).
Also, standard registry detective-work (take known or suspected or partial value, search the reg, then see if the
correct value appears on other computers at same locn). Where found, you can then use reg export or reg query to obtaiin the data.
If you've worked with scripts before, this might be enough
to point the right direction. consult the /? for fsutil and msinfo.
(fsutil does require admin priv., msinfo probly does too. If you need to get that, use "runas". runas.exe will accept a
piped in password, but that's a whole nother security issue...

Report •
Related Solutions

Ask Question