MSFN Forum: Reassigning drive letters automatically - MSFN Forum

Jump to content



  • 8 Pages +
  • « First
  • 4
  • 5
  • 6
  • 7
  • 8
  • You cannot start a new topic
  • You cannot reply to this topic

Reassigning drive letters automatically Batch to do the job Rate Topic: -----

#101 User is offline   drscouse 

  • Member
  • PipPip
  • Group: Members
  • Posts: 237
  • Joined: 03-January 04

Posted 16 September 2005 - 05:01 AM

I have tried both with and without disks in both of the drives, and still having the same problem...

I am however able to successfully change the drves manually using diskpart though...

Cheers

This post has been edited by drscouse: 16 September 2005 - 05:02 AM



#102 User is offline   drscouse 

  • Member
  • PipPip
  • Group: Members
  • Posts: 237
  • Joined: 03-January 04

Posted 16 September 2005 - 05:26 AM

Ive noticed this:

Quote

REM --- Y to I [DISK1      ][DVD-ROM  ] [        ] Different Letter was Y: ---
SELECT Volume 0 
    REMOVE NOERR

REM --- Z to I [DISK2     ] [DVD-ROM  ] [        ] Different Letter was Z: ---
SELECT Volume 1 
    REMOVE NOERR

REM --- Y to I [DISK1      ] [DVD-ROM  ] [        ] Different Letter was Y: ---
SELECT Volume 0 
    ASSIGN LETTER I NOERR

REM --- Z to I [DISK2      ] [DVD-ROM  ] [        ] Different Letter was Z: ---
SELECT Volume 1 
    ASSIGN LETTER I NOERR


It would appear that it is trying to rename both drives to the same letter.. I have both a DVD.I & DVD.G on my system drive....

I think the first prob was somehow to do with a file association.. despite createing a text file, and renaming it in DOS to remove the .txt extension, the filename in explorer was just showing up as DVD, although it said X File in Tyoe, and the file icon was a text file icon, not a generic unknown windows one...

However, it still looks like it is trying to reassign both to the same....

Thanks for your help


EDIT: Just tried again, new files.. same as above, wants to change both to same letter....

Could the script not be confiugred to accept DVD1.X and DVD2.X??

This post has been edited by drscouse: 16 September 2005 - 05:46 AM


#103 User is offline   drscouse 

  • Member
  • PipPip
  • Group: Members
  • Posts: 237
  • Joined: 03-January 04

Posted 17 September 2005 - 04:34 AM

Hmm... suppose I could implement this, and try to solve the DVD issue with a manual script... I

ve put my current Ua build on hold, as I would really like to use this script to automate drive letter reassignment. Especially since it took me ages to find out how to move my pagefile unattended.. I now need to reassign the drives, before I can move the pagefile, and others...

This post has been edited by drscouse: 17 September 2005 - 02:57 PM


#104 User is offline   mdes 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 343
  • Joined: 07-November 03

  Posted 22 September 2005 - 03:32 AM

[Deleted]

This post has been edited by mdes: 29 September 2005 - 04:34 PM


#105 User is offline   mdes 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 343
  • Joined: 07-November 03

  Posted 04 October 2005 - 10:06 AM

Here is a new version (see the first post of this thread for downloading):

Many thanks to drscouse who helps me a lot to test this new version.

Now the reassignments of multiple DVD/CD is fully working :thumbup

This post has been edited by mdes: 04 October 2005 - 10:07 AM


#106 User is offline   drscouse 

  • Member
  • PipPip
  • Group: Members
  • Posts: 237
  • Joined: 03-January 04

Posted 04 October 2005 - 02:24 PM

Tested out a couple of times now.. works great...!!


Thanks mdes for all your help.. much appreciated...!!!!

#107 User is offline   mdes 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 343
  • Joined: 07-November 03

Posted 09 October 2005 - 12:46 AM

New version: I left a bug in the last version :blushing:

(@drscouse: This is not for you, I gave you a bug-free command file)

This post has been edited by mdes: 09 October 2005 - 12:47 AM


#108 User is offline   tinnef 

  • Junior
  • Pip
  • Group: Members
  • Posts: 57
  • Joined: 19-October 03

Posted 22 October 2005 - 02:03 PM

Its' not working at all for me. Here's what drives I have (from disk management) and how the letters get reassigned:

Disk0	 C:  ->  C:
Disk1	 D:  ->  X:
		  E:  ->  none
CDrom0	W:  ->  Z:  (DVD rewriter)
CDrom1	V:  ->  Y:  (Daemon Tools virt drive)


The only thing that needs to change is E: to K:

Attached File  TMP_MAPDRIVE_22_10_2005_19_56_40.LOG.txt (4.32K)
Number of downloads: 44

This post has been edited by tinnef: 22 October 2005 - 02:08 PM


#109 User is offline   mdes 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 343
  • Joined: 07-November 03

Posted 24 October 2005 - 02:40 AM

Hi Tinnef,

You should put the files DRIVE.x on the drives y if you want the drive y to be reassign to x.

So, to reassign the drive E: to K:, you should create a file DRIVE.K in E:\

But, I see there is still an error in my script :( because of the "E: -> none" : I will correct it in a few hours. Could you send me the .log file after running MAPDRIVE.CMD with TEST as the 2d parameter to help me debugging.

Thanks.

This post has been edited by mdes: 24 October 2005 - 02:42 AM


#110 User is offline   tinnef 

  • Junior
  • Pip
  • Group: Members
  • Posts: 57
  • Joined: 19-October 03

Posted 24 October 2005 - 03:29 AM

View Postmdes, on Oct 24 2005, 09:40 AM, said:

So, to reassign the drive E: to K:, you should create a file DRIVE.K in E:\

But, I see there is still an error in my script :( because of the "E: -> none" : I will correct it in a few hours. Could you send me the .log file after running MAPDRIVE.CMD with TEST as the 2d parameter to help me debugging.

Thanks.


That's what I have. But even so, I definetely don't have any DVD.Y or Z files anywhere or a DRIVE.X on D.

I'll double check all the files and run the test this evening.

#111 User is offline   mdes 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 343
  • Joined: 07-November 03

  Posted 24 October 2005 - 10:07 AM

The problem is coming from the fact that your DRIVE.? are Hidden.

Here is a working version: please let me know if everithing is OK now :hello:

Attached File(s)


This post has been edited by mdes: 24 October 2005 - 10:15 AM


#112 User is offline   tinnef 

  • Junior
  • Pip
  • Group: Members
  • Posts: 57
  • Joined: 19-October 03

Posted 24 October 2005 - 11:32 AM

Unfortunately that was only part of the problem.

E: gets reassigned correctly now, but it is still also changing D:,V: and W: although there are no other DRIVE.? DVD.? files

Edit:
I just thought I'd check if Daemon-tools caused problems, but after disabling it the same thing happens

Attached File(s)


This post has been edited by tinnef: 24 October 2005 - 11:39 AM


#113 User is offline   mdes 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 343
  • Joined: 07-November 03

Posted 24 October 2005 - 03:29 PM

If there are no DVD.? on the system drive, then MAPDRIVE reassigns free letters to the DVD (same for CDR and HDD).

In fact, currently, MAPDRIVE is assigning free letters (starting from the alphabet end) to drives that are not forced to be assigned a specific letter (via DRIVE.?, DVD.? and CDR.?). But you gave me a good idea: why do I reassign this kind of free letters instead of leaving the current letter if this one is not forced to be used?

I will try to modify MAPDRIVE to do in such a way :)

This post has been edited by mdes: 24 October 2005 - 03:48 PM


#114 User is offline   tinnef 

  • Junior
  • Pip
  • Group: Members
  • Posts: 57
  • Joined: 19-October 03

Posted 25 October 2005 - 01:47 AM

Then I misunderstood how it works, but the change would be great. So for now a DRIVE.D file on the D: drive etc should solve my problem?

By the way, I don't think the script checks if an optical drive is a writer or not. I have a script which does that. It's a bit quick and dirty (well more dirty than quick), and quite limited, but it pretty much works. I attached it, feel free adapt it and include in MAPDRIVE, because I've reached the limit of my batcj scripting skills with this.

I run it from guirunonce. In an earlier stage I run detectcd (I thin from Icemannd), which writes any CD letters as an environment variable to the registry, then use this to run the script

for %%I in (%CDROM1% %CDROM2%) do call %systemdrive%\install\scripts\cd.cmd %%I


Attached File  cd.cmd.txt (610bytes)
Number of downloads: 62

#115 User is offline   bledd 

  • msfn is a friend of mine!
  • Group: Supreme Sponsor
  • Posts: 1,732
  • Joined: 24-March 04

Posted 25 October 2005 - 06:29 AM

awesome, i'll be using this soon.

thanks for your contribution!

#116 User is offline   mdes 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 343
  • Joined: 07-November 03

  Posted 25 October 2005 - 04:36 PM

All informations are in

Quote

HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices
and all the characteristics of each drive is in the "readable" binary data "\DosDevices\...". But I would prefer to rewrite MAPDRIVE.CMD in a .VBS one to interpret them ;) It's probably Unicode...

#117 User is offline   mdes 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 343
  • Joined: 07-November 03

  Posted 28 October 2005 - 03:37 AM

New version (2005/10/28):
  • DRIVE.?, DVD.? and CDR.? could be hidden.
  • Try to keep the existing letters.
  • Group deasignments and reassignments.
See the first post of this thread to download it.

#118 User is offline   drscouse 

  • Member
  • PipPip
  • Group: Members
  • Posts: 237
  • Joined: 03-January 04

Posted 03 November 2005 - 08:17 AM

Hi mdes.... drscouse.. again!!!

My first attempt at using mapdrive on an unattended install, failed.... at which point it suddenly dawned on me why...

I am trying to run it of an Unattended XP CD I am creating... this would not work, as none of the files created by mapdrive in its execution, could be created on the disk!!

I am trying to run it from cmdlines.txt which executes at the t-12 installation point during setup, and am assuming this is being read from CD, rather than first being copied to the HD?

I know I could run mapdrive from the HD, from the CD... but I would prefer to incorporate it onto the disk... is it therefore possible to set a temp dir on the installation directory for mapdrive to use, and allow it to run from cd?


Thanks

EDIT: Actually, I think it would be easier if I changed the location of the .cmd so that it would be copied to the root of the installation dir.

EDIT: Runs fine from runoncex... works very well indeed!!!!

This post has been edited by drscouse: 03 November 2005 - 09:57 AM


#119 User is offline   mdes 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 343
  • Joined: 07-November 03

Posted 03 November 2005 - 05:23 PM

View Postdrscouse, on Nov 3 2005, 03:17 PM, said:

Hi mdes.... drscouse.. again!!!
You're welcome :yes:

Quote

is it therefore possible to set a temp dir on the installation directory for mapdrive to use, and allow it to run from cd?
Yes, as stated in the documentation which is at the .CMD beginning:
:: Parameters:
:: ----------
::	 1. Language ID (ENU, FRA, DEU,...).  No default value, mandatory.
::	 2. TEST to do everything except the drives de/re-assignment.  The log file
::		TMP_MAPDRIVE_date_time.LOG is created: you can display it to see the expected assignments.
::		The environment variables TMP_VOLDESC- show the assignments to be done.
::	 3. TempPath : Path where temporary files will be created.  Default is current directory.
::		Path could be enclosed in quotes and could terminated by a backslsh.
::		This is the 2d parameter if the TEST is omitted as the 2d one.
You can use %SYSTEMDRIVE%:\...

ps: I jut downloaded a new version in the 1st post.

This post has been edited by mdes: 03 November 2005 - 05:29 PM


#120 User is offline   new_user 

  • Newbie
  • Group: Members
  • Posts: 25
  • Joined: 15-March 04

Posted 04 November 2005 - 01:38 AM

View Postmdes, on Nov 3 2005, 05:23 PM, said:

View Postdrscouse, on Nov 3 2005, 03:17 PM, said:

Hi mdes.... drscouse.. again!!!

ps: I jut downloaded a new version in the 1st post.


Hi mdes !

A new "mapdrive" great ! :thumbup
What's new ?


Longue vie à Mdes, à Mapdrive et à la France


ps: there is no download link on your frist post :}

Share this topic:


  • 8 Pages +
  • « First
  • 4
  • 5
  • 6
  • 7
  • 8
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy