ShrimpBoy Posted February 24, 2005 Share Posted February 24, 2005 Hi all!I'm trying to create something very cool and usefullI've create a little app to ghost and sysprep a computer from winpe without a reboot...The first part work fine...The users choose a disk available, Disk 1 for example...Then the user choose the ghost image he want to have installed ( it depends on hardware...)Then they choose the size for the partition they want the ghost image installed on, from ten to the drive capacity...Then they are prompt to answer some question regarding the sysprep.Then the code run from the informations taken previously.Now I clean the selected disk, create a new partition and ghost it.My problem is for the sysprep part.I need to find the volume number of the selected drive to assign a letter to it to be able to configure the sysprep file on the new partition.How can I retrive the volume number of a disk in script???I don't want to extract my informations from an outputed text file of DISKPARTIs there another way to obtain those information?WMI?Thanks!ShrimpyOne Link to comment Share on other sites More sharing options...
ChrisBaksa Posted February 25, 2005 Share Posted February 25, 2005 I use a customized tool that collects this data and stores it in an INI file.Can't give it out.. sorry. Corporate policy..But here is one question... will you ever need to install the OS to anything but disk 1 Partition 1?I do. So I keep a table that knows what model of server requires a system partition. It sets a variable in my script So now have 2 options. Disk 1 Part 1 and Disk 1 Part 2.There are 2 sub routines. Based on the varables... I know which one to run.Chris Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now