madpro Posted November 13, 2012 Share Posted November 13, 2012 I have a batch file that kicks off diskpart to ready a drive for installation, then it goes on to copy a wim from one network location to another, than applies that wimThis process works manually, so I can boot winpe, then I change drive to D: and kick of the batch file from here, diskpart runs, then closes and the wim copies over and is applied to the HDD, on reboot it boots to windowsI want to automate this process using winpeshl.ini, so so far I havecreated winpeshl.ini and copied it to windows\system32 on the boot.wimcopied the batch file and diskpart text file to same folderNow what happens is diskpart runs ok but then the process falls over at the stage where I am maping the network location, it says it cant start the workstation serviceCan anyone assist please? Link to comment Share on other sites More sharing options...
Tripredacus Posted November 13, 2012 Share Posted November 13, 2012 I'd recommend doing your automation testing with startnet.cmd, and after you get all your commands down, switch it over to winpeshl.ini. The syntax is different for winpeshl.ini. Can you post the contents of it? (obfusicate things like server names, usernames, passwords). Also what version of WinPE are you using and what packages did you add during the build process? Link to comment Share on other sites More sharing options...
madpro Posted November 14, 2012 Author Share Posted November 14, 2012 Hi TripredacusI am using PE 3.0 and I havent added any packages, it is just a basic PE used to boot a machine and copy over a wim from a network locationbat filediskpart /s d:\*.txtnet use p: \\share addressp:copy *.wim m:txt fileselect disk 0 cleancreate partition primary size=512select partition 1format fs=ntfs label=system quickassign letter=cactivecreate partition primaryselect partition 2format fs=ntfs label=win7 quickassign letter=mexitwinpeshl.ini[LaunchApp]AppPath = %SYSTEMDRIVE%\windows\system32\*.batSo I need the txt file to prepare the hard drive for the image, then copy the wim from one location to another and apply it to the HDD Link to comment Share on other sites More sharing options...
Tripredacus Posted November 14, 2012 Share Posted November 14, 2012 Map your drive before running diskpart. Link to comment Share on other sites More sharing options...
madpro Posted November 14, 2012 Author Share Posted November 14, 2012 I tried mapping the drive first, but get an error about workstation service not being startedI added this to the batch file but get another error saying the servbice cant be startedI assume it is because winpe hasnt fully loaded when the mapping is trying to runThe reason I say this is cause if the batch and txt file are just at the root of the winpe folder and I dont use winpeshl, when winpe has loaded it is at an x prompt, I can then do D: and run the batch file from there and it all works fine Link to comment Share on other sites More sharing options...
Tripredacus Posted November 15, 2012 Share Posted November 15, 2012 Try using a startnet.cmd (blank out your winpeshl.ini for this test) and have this at first:wpeinitwpeutil initializenetworkping 127.0.0.1 -n 16 -w 1000>nullnet use z: \\7SERVER\images password /user:kdineenI personally do not use winpeshl.ini for any boot images that connect to the internet. Note, the InitializeNetwork command may or may not be required. The ping is in place because not all NICs are immediately usable after being enumerated. Link to comment Share on other sites More sharing options...
madpro Posted November 16, 2012 Author Share Posted November 16, 2012 Thanks TripredacusI'll try that and let you know 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