Found a few problems using DriverBackup! in an automated way. One problem is
that when in a batch file, the last entry is damaged for some reason... For
example, when I enter the following in a batch file, it fails:
drvbk MODE="BACKUP" BKPATH="Y:\" BKFILE="%DATE%.bki" BKDEVFMT="%DEVNAME%"
OPT="H"
When I give it the following, it works fine:
drvbk MODE="BACKUP" BKPATH="Y:\" OPT="H" BKFILE="%DATE%.bki"
BKDEVFMT="%DEVNAME%"
It isn't just OPT that is getting damaged... if I put BKFILE on the end, it
gives me the default version instead of failing to generate.
Which leads to the next issue... If you put %DATE% into the BKFILE, it doesn't
generate at all. Did generate as %COMPUTER%.bki, didn't generate as
%COMPUTER%_%DATE%.bki, but in this case I'm wanting to make a driver database,
so I don't want recovery files, and it's not supposed to generate a backup
file with the line I'm using, but does so anyways.
Another issue: You can't give it a network location for your data storage. The
way I've gotten around this for now is by doing:
net use Y: \SERVER\SHARE
my drvbk line
net use y: /delete /y
This isn't optimal though compared to actually using the location itself.
One last issue for now. No matter what I've done with command line, I don't
seem able to change BKPATHFTM. I wanted it to just save as
BKPATHFTM="%COMPUTER%" or "%COMPUTER%%DATE%", instead of the standard
"Drivers %COMPUTER%%DATE%" that it defaults to.
Thanks for the awesome tool. I'm looking forwards to working with this as we
move towards Hardware Independent Imaging.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
i'm adding in new release 2.1 support for date and time formatting in order to
solve this bug reported by a lot of people.
I tested also saving files in a network computer as \NETPC\Backup and
DriverBackup! saved files without errors.
Have you checked network access privileges for DriverBackup! ? Try this way
and write me about result.
gvbsource
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I believe the issue is when calling it from the command line... It works fine
saving to a network location from the GUI. Here are some examples. First quote
is from a command line job to \KECDEV-02\EXPRESS\DRIVERS, second is from a
command line job to \KECDEV-02\EXPRESS. Both failed to do any drivers. My job
that maps to the DRIVERS folder and then saves to Q: made 29 folders. The
failed commands are above each of the entries.
DriverBackup! 1.0.0.0
MHEP102-002 Microsoft Windows XP Professional
Microsoft Framework .NET version: v2.0.50727
Available memory: 359532 of 1039692 Kbytes.
DriverBackup! 1.0.0.0
MHEP102-002 Microsoft Windows XP Professional
Microsoft Framework .NET version: v2.0.50727
Available memory: 325308 of 1039692 Kbytes.
Backup started. 32 selected devices.
Backup completed. Backed up devices: 0 of 32.
The BATCH file I use to capture drivers successfully in command line.
Hmm... my quote tags went a bit wonky. I can repost if needed, but hopefully
it gets the idea across. Thanks for the work... it's making scripting OS
installs for different hardware versions much closer to being a reality for
us.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Is there a way to have the software close automatically after running in
command line mode? I have a script where other actions are following but it
gets on hold because the software is waiting for an "Enter"
Thank you
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I suggest you go into a CMD window and type "start /?" for its help file.
Start opens a ne CMD instance to run what follows.
"" is a blank title for the new CMD instance
/Wait pauses the execution of the batch until the "started" operation finishes
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I do not have time right now to look thru your entire batch but:
- why do cd bin? If you insist on it then use complete path.
- before md should use: "if not exist" or "if exist" on that directory and rd md if exists then make new
due to possible previous abnormal termination
- use the complete file path to drvbk command, with "" if contains spaces
- add log spec to drvbk so can see what happened when it runs
-7zip should work if its command is good so REM out that command for tests
It is always best to use complete paths when ever you use a file or program.
That may be your problem in 7 zip.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Well I intent to use this tool from a removable USB Drive; therefore i will
not know the absolute path since the drive will get different letters on a
different machines.
To answer your questions:
- CD BIN - I wanted to arrange all the apps inside the folder BIN and leave only the script outside. I used cd bin so that the script will start the software inside that folder
- the folder created by the apps will be deleted so there is no need to check for its existence
- then the paths again - I wish I can do this but not with a removable device
I guess I'll use it like this; I'll try running in on the root drive to see if
it makes a difference
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
My experience with the wizard also failed. one of the main reasons was that it
created a command line with TWO spaces between each item and it will only work
with ONE space.
I believe there are methods to establish what the drive letter is for a USB
stick. ask in the newsgroup alt.msdos.batch.nt or search the info at http://w
ww.netikka.net/tsneti/info/tscmd.php
If run manually I think that you should add to your batch an operator input
asking the drive letter of the USB stick and then assign a variable using SET
XYZ= to that drive letter and use the variable %XYZ% in your batch for all
subsequent commands.
I do not know why you are using a USB stick because your batch plus data will
take up very little disk space and the data can be incorporated into your
normal backup routine.
Every night I run an unattended batch to do various housekeeping routines
followed by a different batch every day followed by a data backup to a NAS.
One day a week a batch runs drvbk using the command line I offered before. The
data folder is included in the backup which is done by Karen's Replicator
(free) at http://www.karenware.com/powertools/ptreplicator.asp
Everything I read indicates that USB sticks have a finite life and are not the
best backup media unless the stick is checked for errors on a routine basis.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
After some testing v2.1 I find that
- The backup file ALWAYS has a date in the name defaulting to mm-dd-yyyy
- The "R" tag is a Restoration option as before
- The "W" tag is a Log overwrite option as before
- The "V" tag does close DrvrBK even though listed for Verbose Logging.
Here is my new batch command line:
Start "" /Wait "C:\Users\Eric\DriverBackup21\DrvBK.exe" MODE="BACKUP"
BKPATH="C:\Users\Eric\DriverBackup21" BKFILE="Backup from i7.bki"
BKPATHFTM="Drivers i7" OPT="ARLWV"
LOG="C:\Users\Eric\DriverBackup21\Log\Backup.log"
Note that the first time DrvrBK runs it copies all necessary files into the
data folder set by BKPATH so that for following runs you will find the exe
there also and it is not necessary to use a C:|Program Files\ or C:|Program
Files (x86)\ construction.
To use a USB stick with DrvrBk moving it from machine to machine I suggest
that you assign the SAME specific drive letter on each machine to the USB port
to be used. Note that you must always then use the same USB port if you have
multiple ports on a machine.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You are right about the "V" tag - I contacted the author and that did the
trick. i did not see that in help file though.
So V did the trick.
See, I use this tool with 7 Zip and KeyFinder when I work on customer's
computer - before I reinstall, this script will save me all the drivers and
Windows information that I can reuse at re-install.
Thank you for your help.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
After more testing I find that in order to use the date option the command is:
BKDATEFMT="yyyy-MM-dd" to produce 2010-10-04
Note that MM produces two digit months NOT the more normal mm
-- Here are my new command lines:
Set SRC=C:\Users\Eric\DriverBackup21
Start "" /Wait "%SRC%\DrvBK.exe" MODE="BACKUP" BKPATH="%SRC%" BKFILE="Backup
from i7.bki" BKDATEFMT="yyyy-MM-dd" BKPATHFTM="Drivers i7 " OPT="ARLWV"
LOG="%SRC%\Log\Backup.log"
Above "Start" command is on one line and produces folders named:
"C:\Users\Eric\DriverBackup21\Drivers I7 2010-10-04"
Then adding the following to my batch limits the number driver folders to 8;
cd %SRC%
for /f "skip=8 delims=" %%a in ('dir /ad /o-n /b "Drivers i7*"') do rd /s /q
"%%a"
cd C:\
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Now using DrvBK_21_Rev5 with: Set SRC=C:\Users\Eric\DrvBK_21_Rev5\
Required change in command line with **BKPATHFTM ** no longer required:
Start "" /Wait "%SRC%DrvBK.exe" MODE="BACKUP" LOG="%SRC%Backup.log" OPT="ALV"
BKPATH="%SRC%" BKFILE="%SRC%Backup from i7.bki" BKDATEFMT="yyyy-MM-dd"
To result in backup file: "C:\Users\Eric\DrvBK_21_Rev5\Drivers I7 2011-02-02"
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Found a few problems using DriverBackup! in an automated way. One problem is
that when in a batch file, the last entry is damaged for some reason... For
example, when I enter the following in a batch file, it fails:
drvbk MODE="BACKUP" BKPATH="Y:\" BKFILE="%DATE%.bki" BKDEVFMT="%DEVNAME%"
OPT="H"
When I give it the following, it works fine:
drvbk MODE="BACKUP" BKPATH="Y:\" OPT="H" BKFILE="%DATE%.bki"
BKDEVFMT="%DEVNAME%"
It isn't just OPT that is getting damaged... if I put BKFILE on the end, it
gives me the default version instead of failing to generate.
Which leads to the next issue... If you put %DATE% into the BKFILE, it doesn't
generate at all. Did generate as %COMPUTER%.bki, didn't generate as
%COMPUTER%_%DATE%.bki, but in this case I'm wanting to make a driver database,
so I don't want recovery files, and it's not supposed to generate a backup
file with the line I'm using, but does so anyways.
Another issue: You can't give it a network location for your data storage. The
way I've gotten around this for now is by doing:
net use Y: \SERVER\SHARE
my drvbk line
net use y: /delete /y
This isn't optimal though compared to actually using the location itself.
One last issue for now. No matter what I've done with command line, I don't
seem able to change BKPATHFTM. I wanted it to just save as
BKPATHFTM="%COMPUTER%" or "%COMPUTER%%DATE%", instead of the standard
"Drivers %COMPUTER%%DATE%" that it defaults to.
Thanks for the awesome tool. I'm looking forwards to working with this as we
move towards Hardware Independent Imaging.
Dear maymne
i'm adding in new release 2.1 support for date and time formatting in order to
solve this bug reported by a lot of people.
I tested also saving files in a network computer as \NETPC\Backup and
DriverBackup! saved files without errors.
Have you checked network access privileges for DriverBackup! ? Try this way
and write me about result.
gvbsource
I believe the issue is when calling it from the command line... It works fine
saving to a network location from the GUI. Here are some examples. First quote
is from a command line job to \KECDEV-02\EXPRESS\DRIVERS, second is from a
command line job to \KECDEV-02\EXPRESS. Both failed to do any drivers. My job
that maps to the DRIVERS folder and then saves to Q: made 29 folders. The
failed commands are above each of the entries.
\kecdev-02\express\drivers\program\drvbk MODE="BACKUP"
BKPATH="\KECDEV-02\EXPRESS\DRIVERS" OPT="HL" BKFILE="%DATE%.bki"
BKDEVFMT="%DEVNAME%"
Backup started. 32 selected devices.
Backup completed. Backed up devices: 0 of 32.
\kecdev-02\express\drivers\program\drvbk MODE="BACKUP"
BKPATH="\KECDEV-02\EXPRESS" OPT="HL" BKFILE="%DATE%.bki" BKDEVFMT="%DEVNAME%"
Backup started. 32 selected devices.
Backup completed. Backed up devices: 0 of 32.
The BATCH file I use to capture drivers successfully in command line.
This gave me the following:
Hmm... my quote tags went a bit wonky. I can repost if needed, but hopefully
it gets the idea across. Thanks for the work... it's making scripting OS
installs for different hardware versions much closer to being a reality for
us.
Is there a way to have the software close automatically after running in
command line mode? I have a script where other actions are following but it
gets on hold because the software is waiting for an "Enter"
Thank you
The following in my batch closes OK"
Start "" /Wait "C:\Users...\Desktop\DrvBK2\DrvBK.exe" MODE="BACKUP"
BKPATH="C:\Users...\DriverBackup2" BKFILE="Backup %DATE% from i7.bki"
BKPATHFTM="Drivers i7 %DATE%" OPT="ARLW"
LOG="C:\Users...\DriverBackup2\Log\Backup.log"
Note text in BKPATHFTM before %DATE% and inclusion within "s
What I would like is a setting to limit the number of backup files retained
and auto-delete the oldest.
I am not using start and wait. What is it for?
I am using Win 7 and the script just sits there waiting for me to press Enter
- it will run correctly but not close when done
I suggest you go into a CMD window and type "start /?" for its help file.
Start opens a ne CMD instance to run what follows.
"" is a blank title for the new CMD instance
/Wait pauses the execution of the batch until the "started" operation finishes
I ran your script; it works but still waits for my input to close the window.
I'll try win xp
I am on Win 7 Home Premium 64 bit and my batch should work on any recent Win.
There should only be ONE space between each of the command elements.
I suggest making a simple one line batch for testing.
Obviously substitute your user name for the ... shown.
Check that the folders you specify actually exist. I suggest a folder for
testing should be on your desktop.
Here is my script - ignore the part with 7 Zip since it will not work. it is
designed to work from a removable device.
And then this is your version; it still waits for my input:
I do not have time right now to look thru your entire batch but:
- why do cd bin? If you insist on it then use complete path.
- before md should use: "if not exist" or "if exist" on that directory and rd md if exists then make new
due to possible previous abnormal termination
- use the complete file path to drvbk command, with "" if contains spaces
- add log spec to drvbk so can see what happened when it runs
-7zip should work if its command is good so REM out that command for tests
It is always best to use complete paths when ever you use a file or program.
That may be your problem in 7 zip.
Well I intent to use this tool from a removable USB Drive; therefore i will
not know the absolute path since the drive will get different letters on a
different machines.
To answer your questions:
- CD BIN - I wanted to arrange all the apps inside the folder BIN and leave only the script outside. I used cd bin so that the script will start the software inside that folder
- the folder created by the apps will be deleted so there is no need to check for its existence
- then the paths again - I wish I can do this but not with a removable device
I guess I'll use it like this; I'll try running in on the root drive to see if
it makes a difference
I even tried the wizard to generate the command line and it still waits for
Enter to close the window.
My experience with the wizard also failed. one of the main reasons was that it
created a command line with TWO spaces between each item and it will only work
with ONE space.
Read thru my problems and solutions at https://sourceforge.net/projects/drvba
ck/forums/forum/607907/topic/3416588
I believe there are methods to establish what the drive letter is for a USB
stick. ask in the newsgroup alt.msdos.batch.nt or search the info at http://w
ww.netikka.net/tsneti/info/tscmd.php
If run manually I think that you should add to your batch an operator input
asking the drive letter of the USB stick and then assign a variable using SET
XYZ= to that drive letter and use the variable %XYZ% in your batch for all
subsequent commands.
I do not know why you are using a USB stick because your batch plus data will
take up very little disk space and the data can be incorporated into your
normal backup routine.
Every night I run an unattended batch to do various housekeeping routines
followed by a different batch every day followed by a data backup to a NAS.
One day a week a batch runs drvbk using the command line I offered before. The
data folder is included in the backup which is done by Karen's Replicator
(free) at http://www.karenware.com/powertools/ptreplicator.asp
Everything I read indicates that USB sticks have a finite life and are not the
best backup media unless the stick is checked for errors on a routine basis.
In 2.1 version there is "V" option in OPT="" tag. This option forces program
to close is command line window when backup or restore process is ended.
%DATE% must be replaced with %NOW%
I have been using Drvrk2 (not 2.1) because I did not know the new version was
available.
I have d/l the new version and will test it.
I do see the new date format and %N0W%.
The "V" tag is listed for verbose logging and the "R" tag is not mentioned at
all.
After some testing v2.1 I find that
- The backup file ALWAYS has a date in the name defaulting to mm-dd-yyyy
- The "R" tag is a Restoration option as before
- The "W" tag is a Log overwrite option as before
- The "V" tag does close DrvrBK even though listed for Verbose Logging.
Here is my new batch command line:
Start "" /Wait "C:\Users\Eric\DriverBackup21\DrvBK.exe" MODE="BACKUP"
BKPATH="C:\Users\Eric\DriverBackup21" BKFILE="Backup from i7.bki"
BKPATHFTM="Drivers i7" OPT="ARLWV"
LOG="C:\Users\Eric\DriverBackup21\Log\Backup.log"
Note that the first time DrvrBK runs it copies all necessary files into the
data folder set by BKPATH so that for following runs you will find the exe
there also and it is not necessary to use a C:|Program Files\ or C:|Program
Files (x86)\ construction.
To use a USB stick with DrvrBk moving it from machine to machine I suggest
that you assign the SAME specific drive letter on each machine to the USB port
to be used. Note that you must always then use the same USB port if you have
multiple ports on a machine.
You can specify date format using this tag BKDATEFMT="#dateformat#"
more information about date format are included in help guide.
I was just pointing out that without specifying %DATE% in the file format the
current date was added anyway.
You are right about the "V" tag - I contacted the author and that did the
trick. i did not see that in help file though.
So V did the trick.
See, I use this tool with 7 Zip and KeyFinder when I work on customer's
computer - before I reinstall, this script will save me all the drivers and
Windows information that I can reuse at re-install.
Thank you for your help.
After more testing I find that in order to use the date option the command is:
BKDATEFMT="yyyy-MM-dd" to produce 2010-10-04
Note that MM produces two digit months NOT the more normal mm
-- Here are my new command lines:
Set SRC=C:\Users\Eric\DriverBackup21
Start "" /Wait "%SRC%\DrvBK.exe" MODE="BACKUP" BKPATH="%SRC%" BKFILE="Backup
from i7.bki" BKDATEFMT="yyyy-MM-dd" BKPATHFTM="Drivers i7 " OPT="ARLWV"
LOG="%SRC%\Log\Backup.log"
Above "Start" command is on one line and produces folders named:
"C:\Users\Eric\DriverBackup21\Drivers I7 2010-10-04"
Then adding the following to my batch limits the number driver folders to 8;
cd %SRC%
for /f "skip=8 delims=" %%a in ('dir /ad /o-n /b "Drivers i7*"') do rd /s /q
"%%a"
cd C:\
Now using DrvBK_21_Rev5 with: Set SRC=C:\Users\Eric\DrvBK_21_Rev5\
Required change in command line with **BKPATHFTM ** no longer required:
Start "" /Wait "%SRC%DrvBK.exe" MODE="BACKUP" LOG="%SRC%Backup.log" OPT="ALV"
BKPATH="%SRC%" BKFILE="%SRC%Backup from i7.bki" BKDATEFMT="yyyy-MM-dd"
To result in backup file: "C:\Users\Eric\DrvBK_21_Rev5\Drivers I7 2011-02-02"