Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Diskpart script, or other to automate applying a sysprep image?

$
0
0
Hey, Im learning about doing sysprep and creating images for easy deplyment. I have a situation depending on how I boot windows_pe, either from a cd, or a bootable usb, or if a computer has more than one disk installed, the drive letters always seem to change (depending on computers) for the drives that contain the IMAGEX.exe prog, and my .wim files. If the hardrive located at "Disk 0" is unformated, and I use diskpart to create the partitons and format and then try to assign drive "c" to it, it fails because something already has "c" from booting up. What I am doing now, is rebooting twice, each time creating a patition on "Disk 0" so i can assign partition 1 as C, and partition 2 as D. I dont want to reboot twice, so to my question... Can I have a batch file search the drive letters for the imagex prog and my .wim image, get the drive letters they are on, and relocate them to something other than C or D, so diskpart can do its thing without problems?

Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>