Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to write a little batch script which is supposed to backup all printers on a Win2008 print server using printbrm. Here's what I've got so far:

%comspec% /c spool\tools\printbrm -B -S \\SERVERNAME -F Print_Backup.printerExport -O FORCE

All this does is open a command shell, just to close it instantly, though I have no idea why. Can anyone help me out?

share|improve this question

2 Answers 2

You probably want to use the full path %WINDIR%\System32\Spool\Tools, there's no guarantee that %comspec% will start in the right directory.
The /c will make the script close as soon as it's done so add a pause as the last line of the batch file to see what messages show up.

share|improve this answer
up vote 0 down vote accepted

I was able to workaround the problem by simply adding a 'del' clause at the beginning of the script. It seems like the option '-o force' wasn't really doing what it was supposed to.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.