Jump to content
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble

MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, register and become a site sponsor/subscriber and ads will be disabled automatically. 


Dave-H

Formatting an external drive using different interfaces

Recommended Posts

Possibly when you run it this way it "loses" the right Directory info when it spawns the new CMD.EXE. :unsure:

Try adding an explicit setting for the directory, right at the beginning

:: make sure that needed files exist
CD /D %~dp0

 

 

jaclaz

Share this post


Link to post
Share on other sites

OK, that has fixed it!

The command window is closing again at the end though, instead of going back to the command prompt.

 

One thing I have noticed is that Windows 8.1 seems to feel the need to scan drive I: quite often when it mounts.

Why I'm not sure, as looking in the event log it never seems to actually find any problem!

The scan is of course almost instantaneous anyway as it's such a small volume.

 

The only other thing I must now try is to check that it all works OK on the other 4096 interface only machine, to make sure that there are still no complications caused by the network drive.

:)

Share this post


Link to post
Share on other sites

OK, that has fixed it!

Good. :)

The command window is closing again at the end though, instead of going back to the command prompt.

I have no idea why this happens :unsure:, though with the latest versions of Switcher this should be not much of an issue (once outside the testing phase), as the output/feedback of the batch, even in the case of a complete switch/unmount/remouint should fit in a single window (without scrolling), we could even shave off some (unneeded) output of the batch like this part:

Checking drive letters ...

In use: C: D: E: F: G: H: I: J: K: L:

Free : M: N: O: P: Q: R: S: T: U: V: W: X: Y: Z:

that all in all is just "cosmetic", and thus gaining 4 lines of text, and remove the "ECHO" about the actual dsfo command and it's output, regaining another two lines.

 

One thing I have noticed is that Windows 8.1 seems to feel the need to scan drive I: quite often when it mounts.

Why I'm not sure, as looking in the event log it never seems to actually find any problem!

The scan is of course almost instantaneous anyway as it's such a small volume.

Probably (but cannot swear by it) the scan happens on one of the two interfaces (but not on the other) because the Windows 8.x "senses" *something wrong* on the FAT12 partition/volume.

When the interface is 512, the situation is AFAICU "fully kosher", in the sense that the volume and the partition sizes and position match (though there is an abnormal number of reserved sectors in the volume).

When the interface is 4096 instead the volume is much smaller than the partition (though it has just one reserved sector, please read as "normal"), so it is IMHO more likely that the scan is triggered on the 4096 interface.

See the attached image.

 

The only other thing I must now try is to check that it all works OK on the other 4096 interface only machine, to make sure that there are still no complications caused by the network drive.

:)

Yep :yes:.

jaclaz

post-25215-0-18887900-1425057913_thumb.j

Share this post


Link to post
Share on other sites

Hi again jaclaz.

I've now checked with the other machine, and I'm pleased to report that the switcher operates correctly on it, and it now sees drive E: which is the network drive as being in use, and therefore ignores it.

:thumbup

Share this post


Link to post
Share on other sites

Good. :)

Let me know what do you think about making it less verbose.

 

jaclaz

Share this post


Link to post
Share on other sites

I think it would be good if it worked faster as a result, but as everything it does is essential I assume, it would take the same time to run even if it was less verbose, so is there any advantage?

I would have thought that it's better if people can see that it's actually doing something, rather than having pauses with apparently nothing happening.

:)

Share this post


Link to post
Share on other sites

It's only about your note about the cmd windows in some cases closing without giving the opportunity to review the full output, if we make the whole output, even in the "most complex" case, including the "removing of current letter assignment" fit into the "standard" 25 lines that issue is solved.
 
What do you mean by "pauses", at least in Windows XP it seems to me like a "normal" speed, with a line of text output every fraction of a second, exception made for the Diskpart RESCAN, which is however "advertised" by the Diskpart output itself:

Please wait while DiskPart scans your configuration...

 
I mean, if we take one of the last output you posted as a base and number the lines:

I:\>switcherda
1- Vista :ph34r:, or later, ... 
2- OK, I am a local admin ...
3- "DUAL" disk found as \\.\PHYSICALDRIVE5
4-
5-Disk is connected as 4096 bytes/sector
6-
7-NTFS volume found as \\.\Volume{e308684d-bc26-11e4-bfa7-00304879f908}, drive J:
8-
9-* Volume 9 J RAW Partition 931 GB Healthy
10-Removing drive letter J: ...
11-
12-The current NTFS bootsector is NOT the 4kb bytes one
13-switching it ...
14-dsfi \\.\Volume{e308684d-bc26-11e4-bfa7-00304879f908} 0 4096 as4kbNTFS.bss
15-OK, written 4096 bytes at offset 0
16-Please wait while DiskPart scans your configuration...
17-Leaving DiskPart...
18-* Volume 9 New Volume NTFS Partition 931 GB Healthy
19-
20-Mounting the volume to a drive letter...
21-Checking drive letters ...
22-In use: C: D: E: F: G: H: I: S: W:
23-Free : J: K: L: M: N: O: P: Q: R: T: U: V: X: Y: Z:
24-
25-Mounting volume to first free drive letter J: ...
26-OK, done:
27-* Volume 9 J New Volume NTFS Partition 931 GB Healthy
28-Press any key to continue . . .

As I see it, 1 and 2 can be removed without any particular  problem, we could make 12 and 13 a single line and add an empty line after them and remove line 14, and we could as well make lines 20 and 21 a single line and remove line 26.
The output would become:
 

I:\>switcherda
1- "DUAL" disk found as \\.\PHYSICALDRIVE5
2-
3-Disk is connected as 4096 bytes/sector
4-
5-NTFS volume found as \\.\Volume{e308684d-bc26-11e4-bfa7-00304879f908}, drive J:
6-
7-* Volume 9 J RAW Partition 931 GB Healthy
8-Removing drive letter J: ...
9-
10-The current NTFS bootsector is NOT the 4kb bytes one, switching it ...
11-
12-OK, written 4096 bytes at offset 0
13-
14-Please wait while DiskPart scans your configuration...
15-Leaving DiskPart...
16-* Volume 9 New Volume NTFS Partition 931 GB Healthy
17-
18-Mounting the volume to a drive letter, checking drive letters ...
19-In use: C: D: E: F: G: H: I: S: W:
20-Free : J: K: L: M: N: O: P: Q: R: T: U: V: X: Y: Z:
21-
22-Mounting volume to first free drive letter J: ...
23-* Volume 9 J New Volume NTFS Partition 931 GB Healthy
24-Press any key to continue . . .

 

jaclaz

Share this post


Link to post
Share on other sites

The only place there seems to be a bit of an unexplained pause now is after "OK, written 4096 bytes at offset 0".

Not really a problem though, it is quite short.

I assume this is where DISKPART is being run.

The shorter the output the better I agree.

:)

Share this post


Link to post
Share on other sites

The only place there seems to be a bit of an unexplained pause now is after "OK, written 4096 bytes at offset 0".

Not really a problem though, it is quite short.

I assume this is where DISKPART is being run.

The shorter the output the better I agree.

:)

Actually the "pause" should be after:

Please wait while DiskPart scans your configuration...

 

not that much to be assumed :whistle:.

 

Try the attached 011 version :), I "joined" a few lines of info and introduced some empty lines to (hopefully) better highlight what is being done.

 

jaclaz

 

EDIT: Removed, see a few posts below.

Edited by jaclaz

Share this post


Link to post
Share on other sites

Yes, that's good, as the whole output now fits in the window without scrolling.

There is a definite pause after "OK, written 4096 bytes at offset 0" before "Please wait while DiskPart scans your configuration..." comes up.

It's about 10 seconds when going from 512 to 4096, and about 6 seconds when going from 4096 to 512.

I've only tried in on XP as that's what I happen to be running at the moment.

:)

Share this post


Link to post
Share on other sites

Yes, that's good, as the whole output now fits in the window without scrolling.

Good. :)

 

There is a definite pause after "OK, written 4096 bytes at offset 0" before "Please wait while DiskPart scans your configuration..." comes up.

It's about 10 seconds when going from 512 to 4096, and about 6 seconds when going from 4096 to 512.

I've only tried in on XP as that's what I happen to be running at the moment.

:)

That is "queer". :unsure:

I have no such a pause on my machine. :no: there is a slight, maybe 1/3 of a second delay before the "Please wait while DiskPart ..." line appears.

How long does it take on your machine to start Diskpart from command line?

And if you start it from command line, and you input the "rescan" command how long does it take for the "Please wait while DiskPart ..." line to appear?

The attached .gif shows what happens here.

jaclaz

post-25215-0-56504300-1425223898_thumb.g

Share this post


Link to post
Share on other sites

Hmm, mine's nowhere near as quick as that!

:o

Running diskpart from the command prompt it goes to the diskpart prompt almost immediately.

On running "rescan" there is about a four second pause before the next output appears, but only the first time it's run.

If rescan is run again it's instant, the pause only re-appears if diskpart is closed and run again.

:)

Share this post


Link to post
Share on other sites

Maybe it is due to the USB connected disk (or to some other disk connected with a "slowish" BUS/interface) :unsure:, I am using a Virtual Disk, so it is probably as fast as the (SATA) drive on which the image is hosted.

 

I can do nothing to speed up that, I believe.

 

Try the attached (no version number change), at least it provides a more meaningful message.

 

jaclaz

 

 

Switcher011.zip

Share this post


Link to post
Share on other sites

Yes, that's good!

It is strange that the pause is a lot longer going from 512 to 4096 than is is going the other way.

Anyway, it doesn't matter, and the output does now tell you that there's going to be a pause, so that's fine.

:)

Share this post


Link to post
Share on other sites

Yes, that's good!

It is strange that the pause is a lot longer going from 512 to 4096 than is is going the other way.

Anyway, it doesn't matter, and the output does now tell you that there's going to be a pause, so that's fine.

:)

Good :), then I would call it a day and call the 011 version "RTM" ;).

What about the Readme.txt?

Any ideas/suggestions for it?

Find attached the tentative "release" version.

 

jaclaz

ReadMe.zip

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...