Run a script to replace a file from a thumb drive

bleepit

Reputable
Jul 29, 2015
5
0
4,510
I work for a company that sells and services point of sale equipment for a popular restaurant chain. We have some relatively new servers we are working with. They have a RAID card in them to set up the HDDs within them in a RAID 1 configuration. We have had a problem with them twice now where the megasas.sys driver causes a BSOD. I have already done the research to fix this issue. What I want to do is automate this fix with a script so all I need to do is boot to a flash drive and it copies a new megasas.sys file from the flash drive to the C:/Windows/System32/drivers directory.

I've got the idea to use WinPE for this task but I have little to no experience with WinPE. Can WinPE be used in the manor? Or would it be easier some other way?
 

bleepit

Reputable
Jul 29, 2015
5
0
4,510


Yes, C: is on the RAID 1. All I have on the flash drive is WinPE. No .wim files. I won't be imaging anything. All I want to do is copy a new driver file over for the RAID card onto the C drive. I was able to boot into WinPE and opened diskpart and could see the C:\ drive so I assume I don't need to load any drivers in order to complete this process.

I'm actually a couple steps closer than I was in my first post. All I need to do now is get help auto running the script I wrote so that when WinPE is loaded, it runs the script.
 

gbb0330

Reputable
Apr 28, 2015
1,498
0
5,960


https://technet.microsoft.com/en-us/library/cc766521(v=ws.10).aspx

or you can try autoexec.bat on the USB drive