I have just set up a bootable UFD with WinPE 3.0, and I need it to run a couple of scripts automatically on boot.
I was wondering if anyone had any advice on setting up automatic scripts for listing the partitions on the local drive, showing the date of the system, listing the current IP, and capturing an image of the local drive.
If anyone can help that would be great! Thanks.
Build your scripts independently and test their functionality prior to placing them inside of your WinPE. Then mount your winPE so you can edit it and place all of your scripts in the winPE
Mounting command:
Then place your scripts inside of a folder inside your mount folder (which now should have stuff inside of it). Once that completed, you can easily call them by modifying the
..\Windows\System32\startnet.cmd
file.NOTE: DO NOT REMOVE the first line
wpeinit
. Just add after it:start <scriptname.bat or .vbs>
Save and close.
Keep in mind: if you are doing scripts inside of winPE that handles anything with the NIC, you will need to insert the network drivers into your WinPE. Once your winpe loads, it automatically calls
startnet.cmd
first.Some tutorials to do so can be located here.