• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 557
  • Last Modified:

rename network drives Citrix

I'm having issues renaming drives in citrix. (citrix.bat)
The error is;
system error 85 has occured
The local device name is already in use

I'm using the script:
NET USE E: \\xxxxxx\x1

Windows server 2003
0
kwok76_uk
Asked:
kwok76_uk
1 Solution
 
Gerald26Commented:
If E is already in use by a network drive, try this

citrix.bat
----------
If exist e: net use e: /d /y
NET USE E: \\xxxxxx\x1

0
 
AegilCommented:
If might be easier to use letters further up the alphabet and start from Z  Y X etc as windows assigns the drive letters alphabetically and that way you will have less chance of problems with machines with extra drives/partitions etc.
0
 
basrajCommented:
This should help. Add one more line above that.

NET USE E: /delete
NET USE E: \\xxxxxx\x1

0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
kwok76_ukAuthor Commented:
that worked for me, thanks
0
 
Gerald26Commented:
@Basraj add /y after /d so the script wont ask for confirmation if a file is actually opened.
It's wise to avoid error messages by testing if E exists before removing it.

Another note: E can be a local drive, to test if E is a network drive, the script can be modified like this:


@echo off
(net use |find /i "E:">NUL) && goto AlreadyMapped
(mountvol |find /i "E:">NUL) && goto Local
echo "No E drive found"
Goto MapDrive
:AlreadyMapped
If exist E: net use E: /d /y
:MapDrive
NET USE E: \\xxxxxx\x1
Goto Finish
:Local
echo The E:\ Drive is a local drive (Hard Drive, USB, Card ...)"
:Finish

Open in new window

0
 
basrajCommented:
Good
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now