Skip to main content

Is there a way to issue a command in winPE after the image is applied?

Thread needs solution

I have been using acronis to image computers for awhile -- thus I'm pretty familiar with the imaging process. I started a new job and they want me to customize a windows PE acronis media and insert some line of code that will point to the drivers. I've been trying to figure this problem out for a couple of days now, and obviously can't figure it out. Please if you have an experience doing this, I'll appreciate your input.

 

Thank you,

0 Users found this helpful

michael,

You may find the MVP Media Builder tool useful to create TI WinPE media and add the appropriate drivers.  Click on the MVP User Tools and Tutorials link on the right side bar here to grab it.

Hi Michael,

I'm not sure what you're trying to do. Do you mean that you want to restore an image from the WinPE recovery media and then add drivers to it that were not installed in the original image?

Drivers can be added manually to a restored system using the command line tool dism.exe. You need to know the drive letter WinPE assigned to the restored system. Using the MVP Media Builder tool will make this much easier. You could store the drivers in the Extra folder in the WinPE media. You would then open a command prompt from the start menu and issue a dism command such as:

dism.exe /Image:C: /Add-Driver /Driver:X:\Program Files\Extra\Drivers /recurse

Where C: is the WinPE drive letter of the restored image. All the drivers you want to add would be in the Drivers folder added to the MVP Extra folder. The /recurse  option will find all drivers in the folder and any subfolders.

If they want you to make this happen automatically without user input, you won't be able to do that. You could create a separate WinPE media that could be used after the restore to automatically apply the dism command. However, you would need to know that drive letter WinPE assigned to the restored system would always be the same. This would be done by adding the above dism line to the winpeshl.ini file in the \Windows\System32 folder of the WinPE.