Jump to content

Reassigning drive letters automatically


Recommended Posts

Hi Aemetz,

Sorry for the long delay to answer you, but the forum subscription does not seem to work :(

I have no experience with this kind of installation (Win2K + WinXP) :blushing:

If at installation time, C: is the system partition, I think that creating a empty file DRIVE.F on the partition where WinXP has to be installed will solve the issue, but I am not sure this will solve the problem. Perhaps creating DRIVE-.F on the system partition, so MapDrive will not assign the lettre F:, then during the boot, Windows will perhaps take the letter F (which was not assigned by MapDrive) to assign your WinXP partition (so aiigning F: instead of J:).

your program is able to reassign system drives also after installation had been finished?
Yes, but nor the system partition, nor the partition with the page file cannot be reassign. You can run MapDrive in a normal DOS box.
I have to do this prior to install WinXP, e.g. integration of your program into the custom installation CD in unattended mode?
Booting on Win2K, you should be able to change the letter of your WinXP partition to F:; this is maybe THE solution...

I hope to have wel understood and correctly reply to your questions,; in the opposite, ask again ;)

Michel.

ps: MapDrive should be integrated in nLite as an addon; see htp://www.german-nlite.de for further informations.

Link to comment
Share on other sites


Maybe other member can give me some help.

If i recall correctly, if you start XP install from the already unstalled Win2k using the WINNT32.EXE command, drive letters assigned by Win2k will be kept.

Booting on Win2K, you should be able to change the letter of your WinXP partition to F:; this is maybe THE solution...

No, it won't work drive letter assignments are in the Registry, so that changing them under Win2k will only have effect on its Registry, the XP one will remain unaffected.

For the record, it is possible to change boot volume letter, though it is STRONGLY advised NOT to attempt it:

http://www.msfn.org/board/index.php?showtopic=90495

jaclaz

Edited by jaclaz
Link to comment
Share on other sites

@mdes, jaclaz

First of all, Merci and Grazie for your replies.

I have understood the limitations in reassigning drive letters.

I agree with Jaclaz that reassigning drive letters when running W2K will not have effect when installing WinXP.

In the meantime, I continued my posting in the German nLite forum and got some replies there.

I'm sitting in the office actually, so I do not have the time to explain in more details. I will do this later today or at the weekend.

Basically, some nLite members recommended to integrate your (mdes) mapdrive.cmd file in the file hierachy of nLite.

However, the recommended directories do not exist in my personal nLite custom installation for WinXP. This is the problem, I am actually struggling with. I may have to create them manually for unattended installation of the OS. I have to read carefully the appropriate nLite Guide for this particular action I want to perform.

As I said, I may give some more details in the next days, as some members here may be interested in the method as well.

So long

Aemetz

Link to comment
Share on other sites

Hi Aemetz,

just got mail from Michel, that you're trying to integrate mapdrive.cmd in nLite. I just asked for his permission to publish a nlite package doing the same, because i got it working for me using nLite. Please post the link for the thread in the german-nlite.de forum...

greetings

oh, I've just had a look; it was me linking you to this site... ;-)

(see in german: http://www.german-nlite.de/index.php?showtopic=8054)

ps: still having to fix the addon so it copies itself to the Systemdrive to run safely from there. And have to check wether it's possible to include the sleep.exe command from the MS-ResourceKit... Or maybe it has to be downloaded by the user seperatly.

Link to comment
Share on other sites

  • 2 years later...

Dear mdes,

I'm using your Mapdrive.cmd now for years and it always worked fine. Really a great program!

So far I run it from RunOnceEx, with your code:

REG ADD %KEY%\001 /V 1 /D "C:\Install\\MapDrive.cmd DEU >%SystemDrive%\MapDrive.log 2>&1" /f

Like given in the comments.

It always worked.

Now I'm trying to run it from a batch. And I'm not getting it to work.

I used

start /wait "C:\Install\MapDrive.cmd DEU %SystemDrive%\Temp >%SystemDrive%\Temp"

but it doesn't even start.

I got it working manualy when my batch stopped and I changed into the folder c:\Install\ and startet it there by typing MapDrive.cmd DEU >Mapdrive.log.

But this doesn't work executet from my batch which it should, shouldn't it?

Apart from that it always leaves a not existing second CDRom Drive in Explorer. And doesn't Exit anymore.

Have you an Idea how I can make it run from a batch.

Thank You very much!

Kamizoli

Edited by kamizoli
Link to comment
Share on other sites

Now I'm trying to run it from a batch. And I'm not getting it to work.

I used

start /wait "C:\Install\MapDrive.cmd DEU %SystemDrive%\Temp >%SystemDrive%\Temp"

but it doesn't even start.

Hi Kamizoli,

I would try

start /wait "MapDrive or wathever" "C:\Install\MapDrive.cmd DEU %SystemDrive%\Temp >%SystemDrive%\Temp"

because, in some case, a DOS box title is required with START.

I hope this will solve your problem :)

Michel.

Link to comment
Share on other sites

Now I'm trying to run it from a batch. And I'm not getting it to work.

I used

start /wait "C:\Install\MapDrive.cmd DEU %SystemDrive%\Temp >%SystemDrive%\Temp"

but it doesn't even start.

Hi Kamizoli,

I would try

start /wait "MapDrive or wathever" "C:\Install\MapDrive.cmd DEU %SystemDrive%\Temp >%SystemDrive%\Temp"

because, in some case, a DOS box title is required with START.

I hope this will solve your problem :)

Michel.

AS fixed in mdes's response I would suggest that your problem is the use of double-quotes.

The START command expects that the first double-quoted string is the TITLE which means that there's no command to follow it.

Try this:

START "" /WAIT "C:\<snip />

Since you are using the commandline anyway, I see no reason why you don't use:

CALL "C:\<snip />

Link to comment
Share on other sites

Thank You Michel for your reply.

But it is not working. Running

start "MapDrive" /wait "C:\Install\MapDrive.cmd DEU %SystemDrive%\Temp >%SystemDrive%\Temp"

it says it can't find C:\Install\MapDrive.cmd DEU %SystemDrive%\Temp >%SystemDrive%\Temp

By the way the syntax should be

start "MapDrive" /wait "C:..."

Doing it this way:

start "MapDrive" /wait "C:\Install\MapDrive.cmd" DEU %SystemDrive%\Temp >%SystemDrive%\Temp

It finds mapdrive.cmd but I get this message:

"C:\install\MapDrive.cmd" called with the following parameters: [DEU] [C:\Temp] [] []
Der Verzeichnisname ist ungültig.

The German text says that the directory name is not valid.

Maybe it is because I haven't a directory C:\Temp?

Mapdrive starts working, but doesn't close its window and after its finished there is a second CD Drive in the explorer, which is not there in real.

Can you explain to me, why mapdrive is called diffrently from Runoncex and and from a batch or CMDLINES.TXT and what the two parameters (%SystemDrive%\Temp >%SystemDrive%\Temp) are for? I'm not good enough in batch programming to find out, by reading your batch.

After experimenting a bit I found this:

CALL C:\install\MapDrive.cmd DEU >%SystemDrive%\MapDrive.log 2>&1

and it is working for me perfektly.

using

CALL C:\Install\MapDrive.cmd DEU %SystemDrive%\Temp >%SystemDrive%\Temp

I got the same error with the invalid directory name as above.

The problem with the second not existing CD-Drive was my mistake. I forgot, that a new version of one of my programs installs a virtual cd drive.

Thank you very much Michel

@ Yzöwl: While writing this I haven't seen your post. But in the end I did it the way you indicated. Though the double-quotes didn't seem to be the problem, as I have also tryed it without quotes. I starts running but doesn't go back to my original batch.

Many thanks to both of you.

Edited by kamizoli
Link to comment
Share on other sites

  • 2 weeks later...

I was grazing through the threads and ran across this one. I've been manually editing the registry and re-booting for some time. This is working fine, thanks :thumbup

I Install my home systems from the the home LAN. Each system is different, and having this just scan the system disk for the DVD/CD's (DVD.?, CDR.?) and the disable drives (DRIVE-.?) wouldn't work.

I played around with your batch file and changed the logic a bit. The batch now searches the system disk, and all other disk. If it finds dvd or cd's or disable drives (DVD.?, CDR.?,DRIVE-.?) on another drive it clears the variable for those and uses what it finds. So the last disk it finds this info on will be what is used.

I've just used batch files for simple things, even though your put lots of comments in your program, I think what I did was correct.

I feel this is just a step in the same direction you are using with having the DRIVE.? on the drive needing to be re-assiged.

I've done some testing with my version and it seems to be working. I'll attach it here so it can be furthur tested.

filename=MapDrive-WORK.cmd

I've never attached a file on this group; and the preview doesn't show it even though its been uploaded, so I hope it gets attached.

Joe

MapDrive_WORK.cmd

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...