Jump to content

Recommended Posts

Posted

OK,

Here's my problem. I'm setting up an unattended Windows + Office Install.

To do this, I'm running a batch file that screens each drive letter for the existence of a particular file in the root directory of that drive.

Here's some example code:

FOR %%a IN (c: d: e: f: g: h: i: j: k: l: m: n: o: p: q: r: s: t: u: v: w: x: y: z:) DO IF EXIST %%a\XPProSP2.txt SET CDROM1=%%a

(courtesy of SiMoNsAyS )

However, if there's no disk in one of the drives being checked, I get an error message, "THERE IS NO DISK IN DRIVE, etc..." and the batch is halted, requiring user input

I want to avoid this yet still screen each possible drive letter!!

Ideally, I want to suppress any halting as well as any error messages...

Any ideas??

Ran


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...