DrvLoad command issue

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
TheCudder
Posts: 3
Joined: 07 Mar 2015 12:16

DrvLoad command issue

#1 Post by TheCudder » 07 Mar 2015 12:28

So I've developed a user profile back up script which is based on user input to recover data in a pre-boot environment, and while all of that works fine. I'm having getting the part where it loads a specific NIC drive to execute. I'm able to manually type the command and load the drivers successfully, so I know command is not the issue. I don't have the batch file on my home system but it's something like this.

Any idea of why the drvload command does execute in the script? Could it be the pause command? I didn't think of that until i typed this up? I won't be able to make changes until Monday.

Code: Select all

@ echo off
echo 1) PC model A
echo 2) PC model B
echo 3) PC model C

set p/ Driver="What is the model of your system? "(select by number): "

if "%Driver%" == 1 goto ModelA
if "%Driver%" == 2 goto ModelB
if "%Driver%" == 3 goto ModelC

:ModelA
echo Model A selected.
drvload D:\Path\DriverA.INF
goto MapNetworkDrive

:ModelB
echo Model B selected.
drvload D:\Path\DriverB.INF
goto MapNetworkDrive

:ModelC
echo Model C selected.
drvload D:\Path\DriverC.INF
goto MapNetworkDrive

:MapNetwork Drive
pause
(renaming script to map a network drive, choose profile, and transfer data)

Last edited by TheCudder on 09 Mar 2015 07:41, edited 1 time in total.

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: LoadDrv command issue

#2 Post by foxidrive » 07 Mar 2015 13:42

TheCudder wrote:so I know command is not the issue. I don't have the batch file on my home system but it's something like this.


I can see more than one reason why what you've shown would fail - but the reasons I see may not even be in the actual script
- which is why it is critical to see the real script.

TheCudder
Posts: 3
Joined: 07 Mar 2015 12:16

Re: LoadDrv command issue

#3 Post by TheCudder » 09 Mar 2015 07:21

foxidrive wrote:
TheCudder wrote:so I know command is not the issue. I don't have the batch file on my home system but it's something like this.


I can see more than one reason why what you've shown would fail - but the reasons I see may not even be in the actual script
- which is why it is critical to see the real script.


Here is the script...

Code: Select all

@echo off

echo User Data Recovery

@echo:

echo To begin, load network driver.

@echo:

echo 1) Latitude E6410
echo 2) Latitude E6420
echo 3) Latitude E6430
echo 4) Latitude E6440

@echo:

set /p ModelDrv="Select the device model (select by number): "

if "%ModelDrv%" == "4" goto E6440
if "%ModelDrv%" == "3" goto E6430
if "%ModelDrv%" == "2" goto E6420
if "%ModelDrv%" == "1" goto E6410

:E6420
@echo:
echo Loading network driver for %ModelDrv%) Latitide E6420...
echo drvload D:\E6420-E6430\E1c6232.INF
goto Setup

:E6430
@echo:
echo Loading network driver for Latitide %ModelDrv%) E6430...
drvload D:\E6420-E6430\E1c6232.INF
goto Setup

:E6440
@echo:
echo Loading network driver for %ModelDrv%) Latitide E6440...
echo drvload D:\E6440\E1d6232.INF
goto Setup

:E6410
@echo:
echo Loading network driver for %ModelDrv%) Latitide E6410...
echo drvload D:\E6410\E1K6232.INF
goto Setup

:Setup

pause

ipconfig

pause

TheCudder
Posts: 3
Joined: 07 Mar 2015 12:16

Re: DrvLoad command issue

#4 Post by TheCudder » 09 Mar 2015 11:39

I fixed it.

Code: Select all

@echo off

echo User Data Recovery

@echo:

echo A network driver must be installed for this device.

@echo:

echo 1) Latitude E6410
echo 2) Latitude E6420
echo 3) Latitude E6430
echo 4) Latitude E6440

@echo:

set /p ModelDrv="Select the device model (select by number): "

if "%ModelDrv%" == "4" goto E6440
if "%ModelDrv%" == "3" goto E6430
if "%ModelDrv%" == "2" goto E6420
if "%ModelDrv%" == "1" goto E6410

:E6420
@echo:
echo Loading network driver for %ModelDrv% Latitude E6420
drvload "D:\E6420-E6430\E1c6232.INF"
goto Setup

:E6430
@echo:
echo Loading network driver for %ModelDrv% Latitude E6430
drvload "D:\E6420-E6430\E1c6232.INF"
goto Setup

:E6440
@echo:
echo Loading network driver for %ModelDrv% Latitude E6440
drvload "D:\E6440\E1d6232.INF"
goto Setup

:E6410
@echo:
echo Loading network driver for %ModelDrv% Latitude E6410
drvload "D:\E6410\E1K6232.INF"
goto Setup

:Setup

Squashman
Expert
Posts: 4488
Joined: 23 Dec 2011 13:59

Re: DrvLoad command issue

#5 Post by Squashman » 09 Mar 2015 13:34

Pretty obvious problem now that we see the actual code you were using.

Ed Dyreen
Expert
Posts: 1569
Joined: 16 May 2011 08:21
Location: Flanders(Belgium)
Contact:

Re: DrvLoad command issue

#6 Post by Ed Dyreen » 09 Mar 2015 16:54

My 2cents,

NetBootDisk enables me to access the network from a "pre-boot" environment. It fits on a single 1.44MB floppy and recognizes almost all Ethernet cards. I've automated this disk so that it will try and reboot until it finds a driver that works for the system, after that the disk remains calibrated, until it is inserted in a different system with a different NIC. After that it will contact a specific script on a specific server asking what to do next. I use it solely for silent unattended installations. You will find more about that at MSDN forum. It uses JO.SYS [PRESS ANY KEY TO BOOT FROM FLOPPY] so that it can be left safely in the drive.

Squashman
Expert
Posts: 4488
Joined: 23 Dec 2011 13:59

Re: DrvLoad command issue

#7 Post by Squashman » 09 Mar 2015 18:44

When I was a Netware Admin we PXE booted all of our desktops.

Post Reply