PDA

View Full Version : Difficult Drive Mapping Question


degger
December 3rd 04, 12:05 AM
I'm a law student and we take our tests via a wierd program on our laptops..
that lets us use a word processor, but blocks out all other programs...

When I run the program on my windows machine I start with a batch file that
logs me into the system. It is supposed to allocate my S: Drive for this use.

However, the program keeps finding that my S: Drive "already exists or is
already mapped".

However, I checked my computer, network neighborhood and even looked using
MSDos... I can't see how the S: drive is already mapped.

Am I doing something screwy?

here is the bit of the program that keeps hanging up:
-----------------

:: SEE IF DRIVE S: IS ALREADY MAPPED OR NOT
:CheckMapped
:: ECHO Checking for mapped drive S:...
NET USE | FIND "S:" > NUL
IF NOT ERRORLEVEL 1 GOTO NetDriveMapped
IF ERRORLEVEL 1 GOTO NetDriveOpen


:: S: IS MAPPED, ABORT
:NetDriveMapped
ECHO ERROR: Drive S: already exists or is already mapped
ECHO ERROR: Please contact an administrator.
GOTO EndError
-------------------

Jeff Richards
December 3rd 04, 12:38 AM
The CheckMapped function is where the problem occurs, and presumably you
don't have access to that. If you have TweakUI installed, make sure it is
not set to hide drive S.
--
Jeff Richards
MS MVP (Windows - Shell/User)
"degger" > wrote in message
...
> I'm a law student and we take our tests via a wierd program on our
> laptops..
> that lets us use a word processor, but blocks out all other programs...
>
> When I run the program on my windows machine I start with a batch file
> that
> logs me into the system. It is supposed to allocate my S: Drive for this
> use.
>
> However, the program keeps finding that my S: Drive "already exists or is
> already mapped".
>
> However, I checked my computer, network neighborhood and even looked using
> MSDos... I can't see how the S: drive is already mapped.
>
> Am I doing something screwy?
>
> here is the bit of the program that keeps hanging up:
> -----------------
>
> :: SEE IF DRIVE S: IS ALREADY MAPPED OR NOT
> :CheckMapped
> :: ECHO Checking for mapped drive S:...
> NET USE | FIND "S:" > NUL
> IF NOT ERRORLEVEL 1 GOTO NetDriveMapped
> IF ERRORLEVEL 1 GOTO NetDriveOpen
>
>
> :: S: IS MAPPED, ABORT
> :NetDriveMapped
> ECHO ERROR: Drive S: already exists or is already mapped
> ECHO ERROR: Please contact an administrator.
> GOTO EndError
> -------------------

degger
December 3rd 04, 01:03 AM
Thanks for the quick reply. I actually do have access to the batch file they
make us run. Either I can change it or I can bring the change to them.

Is there a mistake in the coding?

As far as TweakUI is concerned, I'm almost certain I don't have it installed.

"Jeff Richards" wrote:

> The CheckMapped function is where the problem occurs, and presumably you
> don't have access to that. If you have TweakUI installed, make sure it is
> not set to hide drive S.
> --
> Jeff Richards
> MS MVP (Windows - Shell/User)
> "degger" > wrote in message
> ...
> > I'm a law student and we take our tests via a wierd program on our
> > laptops..
> > that lets us use a word processor, but blocks out all other programs...
> >
> > When I run the program on my windows machine I start with a batch file
> > that
> > logs me into the system. It is supposed to allocate my S: Drive for this
> > use.
> >
> > However, the program keeps finding that my S: Drive "already exists or is
> > already mapped".
> >
> > However, I checked my computer, network neighborhood and even looked using
> > MSDos... I can't see how the S: drive is already mapped.
> >
> > Am I doing something screwy?
> >
> > here is the bit of the program that keeps hanging up:
> > -----------------
> >
> > :: SEE IF DRIVE S: IS ALREADY MAPPED OR NOT
> > :CheckMapped
> > :: ECHO Checking for mapped drive S:...
> > NET USE | FIND "S:" > NUL
> > IF NOT ERRORLEVEL 1 GOTO NetDriveMapped
> > IF ERRORLEVEL 1 GOTO NetDriveOpen
> >
> >
> > :: S: IS MAPPED, ABORT
> > :NetDriveMapped
> > ECHO ERROR: Drive S: already exists or is already mapped
> > ECHO ERROR: Please contact an administrator.
> > GOTO EndError
> > -------------------
>
>
>

Jeff Richards
December 3rd 04, 01:48 AM
Sorry - I read CheckMapped as a supplied utility that did some mysterious
checking. In fact, it's just a label in the command file.

The batch file lines starting :Checkmapped use the NET USE command. The
response is then searched for S:. An error level setting of 1 indicates that
S: was not part of the response to the command, and this is used to indicate
that drive S is available. You can execute the command NET USE and see
where S: is appearing in the response. If it is listed as a drive then
somehow it is being mapped, and you will need to track down why. If it's
not listed then the S: must be appearing as part of some other text, and you
can re-write the test so that both results indicate that the drive isn't
mapped.
IF NOT ERRORLEVEL 1 GOTO NetDriveOpen
IF ERRORLEVEL 1 GOTO NetDriveOpen

--
Jeff Richards
MS MVP (Windows - Shell/User)
"degger" > wrote in message
...
> Thanks for the quick reply. I actually do have access to the batch file
> they
> make us run. Either I can change it or I can bring the change to them.
>
> Is there a mistake in the coding?
>
> As far as TweakUI is concerned, I'm almost certain I don't have it
> installed.
>
> "Jeff Richards" wrote:
>
>> The CheckMapped function is where the problem occurs, and presumably you
>> don't have access to that. If you have TweakUI installed, make sure it is
>> not set to hide drive S.
>> --
>> Jeff Richards
>> MS MVP (Windows - Shell/User)
>> "degger" > wrote in message
>> ...
>> > I'm a law student and we take our tests via a wierd program on our
>> > laptops..
>> > that lets us use a word processor, but blocks out all other programs...
>> >
>> > When I run the program on my windows machine I start with a batch file
>> > that
>> > logs me into the system. It is supposed to allocate my S: Drive for
>> > this
>> > use.
>> >
>> > However, the program keeps finding that my S: Drive "already exists or
>> > is
>> > already mapped".
>> >
>> > However, I checked my computer, network neighborhood and even looked
>> > using
>> > MSDos... I can't see how the S: drive is already mapped.
>> >
>> > Am I doing something screwy?
>> >
>> > here is the bit of the program that keeps hanging up:
>> > -----------------
>> >
>> > :: SEE IF DRIVE S: IS ALREADY MAPPED OR NOT
>> > :CheckMapped
>> > :: ECHO Checking for mapped drive S:...
>> > NET USE | FIND "S:" > NUL
>> > IF NOT ERRORLEVEL 1 GOTO NetDriveMapped
>> > IF ERRORLEVEL 1 GOTO NetDriveOpen
>> >
>> >
>> > :: S: IS MAPPED, ABORT
>> > :NetDriveMapped
>> > ECHO ERROR: Drive S: already exists or is already mapped
>> > ECHO ERROR: Please contact an administrator.
>> > GOTO EndError
>> > -------------------
>>
>>
>>