rename network drives Citrix

Posted on 2011-10-14
Last Modified: 2012-05-12
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
Question by:kwok76_uk
    LVL 6

    Accepted Solution

    If E is already in use by a network drive, try this

    If exist e: net use e: /d /y
    NET USE E: \\xxxxxx\x1

    LVL 8

    Expert Comment

    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.
    LVL 19

    Expert Comment

    This should help. Add one more line above that.

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


    Author Closing Comment

    that worked for me, thanks
    LVL 6

    Expert Comment

    @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
    If exist E: net use E: /d /y
    NET USE E: \\xxxxxx\x1
    Goto Finish
    echo The E:\ Drive is a local drive (Hard Drive, USB, Card ...)"

    Open in new window

    LVL 19

    Expert Comment


    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Join & Write a Comment

    A quick step-by-step overview of installing and configuring Carbonite Server Backup.
    ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
    How to install and configure Citrix XenApp 6.5 - Part 1. In this video tutorial we have explained step by step installation of Citrix XenApp 6.5 Server on Windows Server 2008 R2 is explained in this video. We have explained the difference between…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now