Here are the list of apps that is needed:
- Generic .wim file(recommended to use an x86 wim file) - This can be pulled from MDT 2013 "deploymentshare\boot" or use the ADK/WAIK toolkit to create one. Use this link to a generic WinPE using the "Deployment and Imaging Toolkit" found in the ADK package
- PStart portable setup version
- editv32.exe - you will have to extract the editv32 from the zip file
- showconsole.exe
- Portable apps can be found at - http://portableapps.com/
- Dism /Mount-Image /ImageFile:"C:\Images\boot.wim" /index:1 /MountDir:"C:\Images\boot"
I created a folder in the root of my "C" drive called "Images". Inside that folder I copied my created another folder with that same name as my wim file for simplicity. In our case "boot". I then copied the boot.wim wim file that I created to the "c:\images" folder.
Next, I open the "Command prompt" as an administrator and run the command above.
Once the "boot.wim" image has been ummount your "c:\images\boot" folder should have contents in it. This is going to be barebone.
This is where I leave you hanging. You will have to create your own PStart menu. Modify your .xml file as needed to your environment. After setting up your PStart menu you will then have to add the "showconsole" and "editv32" to the "system32" folder of your "c:\images\boot" folder. So what is the "showconsole"? This program allows us to minimize the "cmd/command" prompt window once our startnet.cmd is completed. "editv32" is another useful tool as it mask the password that you are entering instead of showing it in clear text while you type. Obviously that step is optional if you are not looking to include a password.
Here is a copy of our "startnet.cmd" file.
@echo off
cls
echo Iniattialing C:\ drive
set /a h=1
set /a j=1
set pass=NULL
set passWord=Password
:_authME
cls
echo akITs.net WinPE Environment
echo Any computer problem just one price
echo.
echo.
echo Please enter the correct password
echo.
echo.
editv32 -m -p "Password: " pass
if %pass%==%passWord% goto _startP
if %j% GEQ 3 goto _authFail
set /a j+=1
if not %pass%==%passWord% goto _authME
:_authFail
echo es stupido. goodbye
wpeutil shutdown
:_startP
if exist "c:\users" goto _contHere
if exist "c:\documents and settings" goto _contHere
set /a i=%h%+1
if %h% GEQ 7 goto _contHere
echo > diskpart.txt Sel disk 0
echo >> diskpart.txt lis part
echo >> diskpart.txt Select part %h%
echo >> diskpart.txt detail part
echo >> diskpart.txt remove
echo >> diskpart.txt Select part %i%
echo >> diskpart.txt detail part
echo >> diskpart.txt remove
echo >> diskpart.txt assign letter=C
echo >> diskpart.txt detail part
diskpart /s diskpart.txt
set /a h+=1
goto _startP
:_contHere
cls
echo akITs.net WinPE Environment
echo Any computer problem just one price
echo.
echo Initializing Environment
echo Please Wait...
wpeinit
ping servernameKevin
cls
echo.
ECHO Mapping network drive Y:
echo.
NET USE Y: /delete >NUL 2>&1
NET USE Y: \\servernameKevin\akits /user:akits\jdoe Password1 /persistent:no
goto END
:END
cls
START "" "%PROGRAMFILES%\pstart.exe"
START "" "%PROGRAMFILES%\BGINFO\BGINFO.CMD"
SHOWCONSOLE MINIMIZED
Basically the first portion of it is initializing some variables including numeric ones.
Next, it prompts for password. If the correct password is not entered after 3 tries it will shutdown the computer.
Once the correct password has been entered the program then go and find the correct partition with the users data. This script is assuming only 1 hard drive so it will always use disk 0. Because windows 7 or later creates a separate system partition this is a problem in WinPe mode where WinPe assigns the 'System" partition as the "C" drive. Therefore we create this diskpart script to reassign the c: drive based on our criteria which looks for the "c:\users" or "c:\documents and settings" folder. This will continue to loop until the folder is found. On on VM with no operating system this was a problem so we put a counter of 7 which stops if the folder is not found by the 7th try.
Once the C partition is processed we then map our network drive.
Next, we started our PStart program and bginfo file.
Finally we used the "showconsole" command to minimized the command prompt window.
Once you have modified your "startnet.cmd" file go ahead and commit the changes back to your boot folder by running the following command:
- Dism /Unmount-Image /MountDir:"C:\Images\boot" /commit
You can then add this wim file to your WDS server and boot into it once when you PXE boot. This is added to our WDS environment along with our MDT litetouch wim file.
I am omitting alot of information such as how did I get Windows RDP version 6.2.900 to work with my 6.3.9600 WinPE build. Some of the details are really time consuming to write than it is to just tell you what to do. Just shoot us an email of give us a call if you have any questions. Thanks for reading.