The system cannot find the drive specified.

Microsoft Windows
Post Reply
User avatar
MigrationUser
Posts: 336
Joined: 2021-Jul-12, 1:37 pm
Contact:

The system cannot find the drive specified.

Post by MigrationUser »

10 Jun 2011 07:30
hilgie

Ok, have this 'problem' and can't figure it out.

When I call an external script like this:

Code: Select all

call %~dp0..\..\..\AL\APPS\BAT\ALAL1TIMEDATE.BAT
I get an error in the output file -> The system cannot find the drive specified.

But, it runs the batch file (so it can be found) and therefore the error message isn't correct (so I think). Anybody???

And it only happens on 1 system overhere. So all the other systems where this script runs on don't have this problem.

Cheers

Last edited by hilgie (10 Jun 2011 07:33)

----------------------------
#2 10 Jun 2011 08:29
npocmaka


May be the called bat return this error?
you can set
ECHO ALAL1TIMEDATE.BAT CALLED
at the begining of ALAL1TIMEDATE.BAT to check this.

Last edited by npocmaka (10 Jun 2011 08:30)

----------------------------

#3 10 Jun 2011 09:05

hilgie


Ok, did this. But now it only shows in the output of the main bat file (because of an echo statement):

**************************************** START *******************************************
ALAL1TIMEDATE.BAT CALLED
The system cannot find the drive specified.
The system cannot find the drive specified.

How now?

----------------------------

#4 10 Jun 2011 12:07
RG


Try putting this statement in both scripts:

Code: Select all

   ECHO.CD=%CD%
If you used 'RUN AS ADMIN' the Current Directory gets changed... so the CD could be different between the 2 scripts.
If so, put this statement near the beginning of the script that has the unexpected CD.

Code: Select all

   PUSHD %~dp0
For this reason, most of my scripts have PUSHD %~dp0 at the beginning and a corresponding POPD at the end.

Last edited by RG (10 Jun 2011 13:19)

Windows Shell Scripting and InstallShield
Post Reply