[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

command-line "Changing a drive letter"

Posted on 2003-12-12
9
Medium Priority
?
2,991 Views
Last Modified: 2010-04-13

Under disk managment, you can change the drive letters for the partitions, or drives in your system.

Does anyone know how to do this at the command prompt?

I know I can assign drive letters like:
c:\> net use k: "\\myserver\hidShare$" /persistent:yes

But I'm looking for a command that will manipulate the drive letters already assigned by the Operating System. (or delete drive letters assinged to a particular partition - and (perhaps, but not necessary) mount it as a volume)

Thanks IA for any info.
0
Comment
Question by:ramble
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
9 Comments
 
LVL 57

Expert Comment

by:Pete Long
ID: 9928467
Hi ramble,
SUBST

Substitute a drive letter for a network or local path.


syntax
      SUBST drive_letter: path
   
      SUBST
   
      SUBST drive_letter: /D

key
   SUBST with no parameters will display current SUBST drives

   /D : Delete the drive_letter substitution.
Compared to mapping a drive with NET USE the SUBST command allows mapping to a subfolder of a drive share - for the storage of user profiles this reduces the number of shares you need to create on the server.

Bugs
Under NT 4 SUBST'ed drives cannot be disconnected using the Explorer GUI - this was fixed in Win 2K.

In Win 2k you will have problems creating, accessing and deleting drive mappings with SUBST.

However under Win 2K or XP the functionality of the NET USE command is improved so you can now do
NET USE g: \\server\share\folder1\folder2

If the network resource is unavailable (ie the server is down) SUBST will continually retry - unlike NET USE which will try to connect once and fail - depending on your application this may be a good or a bad thing - a subst drive that is not available will badly impact performance of most applications.

Notice that when SUBST is used against a local shared folder, it will create a RECYCLER for that drive. The RECYCLER is not removed when the drive substitution is removed, but can be deleted manually.

"A man should never be ashamed to own he has been in the wrong, which is saying in other words, that he is wiser today than he was yesterday" - Alexander Pope (thoughts on various subjects)

Related Commands:

NET USE - Map a drive letter to a network drive

Equivalent Linux BASH commands:

none - unix has mount points rather than silly drive letters


http://www.ss64.com/nt/subst.html

PeteL
0
 

Author Comment

by:ramble
ID: 9928715

yes, actually, the command that I used in my example (net use) is better than subst for many situation.

I'm actually wanting to be able to change the letter on actual partitons, or disks.  In the "Disk Manager", Notice the Disks have a Disk ID (such as disk0, disk1, disk2...etc).  I am probably looking for something that would have to refer to the disk ID and/or partition ID information.

0
 
LVL 7

Expert Comment

by:wtrmk74
ID: 9937835
you will have to invest in a partition manager !

this cannot be done within a DOS coomand...
LABEL - will change the drive label
DBLSPACE - can unmount and mount but cannot be ran while windows GUI is running.

Sorry,
wtrmk74
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

Author Comment

by:ramble
ID: 9937994

This CAN be done.  (albeit a 3rd party windows script utility, or a C or CPP program).  Every command that one requests for windows to perform some kind of action is done  by a system call.  This forum is only one avenue I'm using to find out what that system call is...and how to use it.  

I might need to post this question in a programming forum, instead of an OS forum...but I thought that an Admin out there may have ran across this.  

But make no mistake, the solution exists!

0
 
LVL 57

Accepted Solution

by:
Pete Long earned 1000 total points
ID: 9943683
You Might want to request  PAQ Refund for this question :0)

Pete
0
 

Author Comment

by:ramble
ID: 9944323

Good Answer!  :^)
0
 
LVL 57

Expert Comment

by:Pete Long
ID: 9944335
You are far to kind, ThanQ

Pete
0
 

Author Comment

by:ramble
ID: 10893569
Thanks_ramble

Just Ignore the last comment
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
One of the most important things in an application is the query performance. This article intends to give you good tips to improve the performance of your queries.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

649 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