0

I am running Wbadmin for backup purposes in a batch file, however the batch execution halts, prompting for a password although the password is provided.

First attempt - include password in command:

cmd /c "C:\Windows\system32\wbadmin.exe" start backup -backuptarget:\\acrux\BACKUP02 -include:"c:" -quiet -allcritical -noVerify -user:backupuser password:operbackup 

Second attempt - Echo password (with pipe):

cmd /c echo operbackup | "C:\Windows\system32\wbadmin.exe" start backup -backuptarget:\\acrux\BACKUP02 -include:"c:" -quiet -allcritical -noVerify -user:backupuser 

The batch file is being fired from Task Scheduler running with maximum privileges within an Administrator-level account. Platform: Windows 7 & 8

Riccardo
  • 253
  • 1
  • 3
  • 13
  • `-include:"c:"` option gives me `The filename, directory name or volume label syntax is incorrect` error. Should be `-include:c:` without double quotes (win8). – JosefZ Jul 27 '15 at 15:27
  • Correct, however with the right syntax it will keep prompting for the password: "C:\Windows\system32\wbadmin.exe" start backup -backuptarget:\\acrux\BACKUP02 -include:c: -quiet -allcritical -noVerify -user:backupuser – Riccardo Oct 05 '15 at 15:05
  • Should be `-password:operbackup` instead of `password:operbackup` (missing leading dash in parameter name). – JosefZ Oct 05 '15 at 15:52
  • you also don't need to use `-include:c:` when using `-allcritical` as `-allcritical` will include the c: anyway – Drifter104 Oct 05 '15 at 16:19

1 Answers1

0

The problem was due to passing parameters to a batch file with a maximum of 9! The tenth parameter (password) was ignored, forcing the prompt!!!

Riccardo
  • 253
  • 1
  • 3
  • 13