Dave-H Posted March 8, 2015 Author Share Posted March 8, 2015 OK, that's working! This is going from 512 to 4086 -Microsoft Windows [Version 6.3.9600](c) 2013 Microsoft Corporation. All rights reserved.C:\WINDOWS\system32>I:I:\>switcherqev"DUAL" disk found as \\.\PHYSICALDRIVE4, connected as 4096 bytes/sectorThe NTFS Volume is Volume{e308684d-bc26-11e4-bfa7-00304879f908}Checking drive letters ...In use: C: D: E: F: G: H: I: S: W:Free : J: K: L: M: N: O: P: Q: R: T: U: V: X: Y: Z:Mounting volume to drive letter J: ... OK, done:Press any key to continue . . .Volume 7 J RAW Partition 931 GB HealthyFilesystem is RAW, we need to switch ...OK, switched:Next is the LABEL commandPress any key to continue . . .LABEL J:Data_4kbPress any key to continue . . .Volume 7 J Data_4kb NTFS Partition 931 GB HealthyEverything is cool ...Press any key to continue . . .I:\>This is going from 4096 to 512 -Microsoft Windows [Version 6.3.9600](c) 2013 Microsoft Corporation. All rights reserved.C:\WINDOWS\system32>I:I:\>switcherqev"DUAL" disk found as \\.\PHYSICALDRIVE4, connected as 512 bytes/sectorThe NTFS Volume is Volume{e308684d-bc26-11e4-bfa7-00304879f908}Checking drive letters ...In use: C: D: E: F: G: H: I: S: W:Free : J: K: L: M: N: O: P: Q: R: T: U: V: X: Y: Z:Mounting volume to drive letter J: ... OK, done:Press any key to continue . . .Volume 7 J RAW Partition 931 GB HealthyFilesystem is RAW, we need to switch ...OK, switched:Next is the LABEL commandPress any key to continue . . .LABEL J:Data_512Press any key to continue . . .Volume 7 J Data_512 NTFS Partition 931 GB HealthyEverything is cool ...Press any key to continue . . .I:\>Again using elevated command prompts.The "you need to format the disk in drive J: before you can use it" window is still popping up when the script runs though, which is a bit off putting! Link to comment Share on other sites More sharing options...
jaclaz Posted March 8, 2015 Share Posted March 8, 2015 OK, that's working! Good. The "you need to format the disk in drive J: before you can use it" window is still popping up when the script runs though, which is a bit off putting! Yes it is . Though I am not sure what specific command triggers it. The only one that may cause it, could be the MOUNTVOL command , because we actually (when the switch is needed) mount to the first drive letter the volume with the "other geometry" bootsector. Try the attached, it is only a (hopefully working) quick fix, in which I moved the mounting to first drive letter to after the switch (if needed) is performed. If that is the issue, then I will rewrite the routine less half-@§§edly. jaclazSwitcherQEVmod2.zip Link to comment Share on other sites More sharing options...
Dave-H Posted March 8, 2015 Author Share Posted March 8, 2015 (edited) OK, that seems to work fine! Works OK when double clicked too. Edited March 8, 2015 by Dave-H Link to comment Share on other sites More sharing options...
jaclaz Posted March 14, 2015 Share Posted March 14, 2015 Ok, this is another release of SwitcherQEV, now it should be as simple as possible while still working fine and be "quick", when you have time/occasion test it, and if everything seems fine I will promote it to final and release the whole stuff. jaclazSwitcherQEVmod3.zip Link to comment Share on other sites More sharing options...
Dave-H Posted March 15, 2015 Author Share Posted March 15, 2015 (edited) That's fine jaclaz!Works when double clicked and when right clicked and run as an administrator.Also works fine from a desktop shortcut, non-elevated or elevated.I've only checked on 8.1, but I have no reason to think that it won't be fine on XP too. There's still a short pause on my system after "Mounting volume to drive letter J: ... OK, done:", but I really wouldn't worry about it!Great work, now get that final release out and get on to your next thing!Cheers, Dave. Edited March 15, 2015 by Dave-H Link to comment Share on other sites More sharing options...
jaclaz Posted March 15, 2015 Share Posted March 15, 2015 Well, but the whole point is to have the user experience be as "smooth" as possible. Try the attached, let's see if the effect is mitigated by adding a couple lines of output. jaclazSwitcherQEVmod4.zip Link to comment Share on other sites More sharing options...
Dave-H Posted March 15, 2015 Author Share Posted March 15, 2015 Yes, that's better, especially as it now tells you the volume label it's going to assign to the drive, which will tell people why the drive ends up labelled as it is!Just one last suggestion, when it prints "Bootsector is the "other" XX one" I think it would be better if it printed "Bootsector is the "wrong" XX one".I think that would be clearer, and would agree with what it prints if you run the switcher when it's not actually needed, when it prints "Bootsector is the "right" XX one". Link to comment Share on other sites More sharing options...
jaclaz Posted March 15, 2015 Share Posted March 15, 2015 Done .I made another couple little changes adding a couple empty lines to make the output more readable. jaclazSwitcherQEVmod5.zip Link to comment Share on other sites More sharing options...
Dave-H Posted March 15, 2015 Author Share Posted March 15, 2015 Yes, that's great! One thing I have noticed is that often the display of the label on the drive in Explorer doesn't update, and still shows the old label even after switching, although the drive works fine with the new configuration. Refreshing the display doesn't seem to fix it, only removing and replacing the drive fixes it.I guess that's a Windows thing that can't be fixed. Link to comment Share on other sites More sharing options...
jaclaz Posted March 16, 2015 Share Posted March 16, 2015 Yes, that's great! One thing I have noticed is that often the display of the label on the drive in Explorer doesn't update, and still shows the old label even after switching, although the drive works fine with the new configuration. Refreshing the display doesn't seem to fix it, only removing and replacing the drive fixes it.I guess that's a Windows thing that can't be fixed. No , this should not happen. The bootsector of the NTFS volume on the disk (at connection time) is EITHER set to the 512 or to the 4kb.IF it is 512 and the connection is 512 then the label Data_512 is read (and the switcherQE doesn't do anything to it). IF it is 512 and the connection is 4kb then the label is NOT read (as Explorer has no way to read it, for all it knows it is a malformed filesystem) and the switcherQE changes it to Data_4kb. IF it is 4kb and the connection is 4kb then the label Data_4kb is read (and the switcherQE doesn't do anything to it). IF it is 4kb and the connection is 512 then the label is NOT read (as Explorer has no way to read it, for all it knows it is a malformed filesystem) and the switcherQE changes it to Data_512.In cases 2 and 4 at connection time Explorer should show a non-label, i.e. the default "Local Disk" and (hopefully) after the switch either Data_512 or Data_4kb, you should never have a situation in which you have Data_512 and after the switch it becomes Data_4kb or viceversa. If "Local Disk" remains after the switch could be an "update lag" in Explorer, if you close the Explorer Windows and re-open it should be updated. Can you check and find a "repeatable sequence" that causes the issue?Now the batch tells you when it actually switches and issues the LABEL command, if the batch outputs ECHO Assigning Label "Data_%Disk_Connected_As%" to drive %FirstFree%and/or the last line (diskpart output) shows the "right" label the result should be reflected in Explorer immediately, at least this is what happens here in XP, maybe Windows 8.x has (yet another) different behaviour?jaclaz Link to comment Share on other sites More sharing options...
Dave-H Posted March 16, 2015 Author Share Posted March 16, 2015 Well, I've tried again today, and would you believe it, I now can't fault it, the label is switching correctly all the time!Yesterday, it quite consistently wasn't.Just one of those anomalies that make you love computers I guess, but it doesn't look as if there really is any problem after all. Link to comment Share on other sites More sharing options...
jaclaz Posted March 18, 2015 Share Posted March 18, 2015 (edited) Ok.0.99 version (more or less "final unless something new comes out") is out, here:http://www.msfn.org/board/topic/173642-mkprilog-batch-to-access-a-same-disk-under-two-different-interfaces/ jaclaz Edited March 19, 2015 by jaclaz Link to comment Share on other sites More sharing options...
Dave-H Posted March 18, 2015 Author Share Posted March 18, 2015 Thanks jaclaz, but that link just seems to go the the first post on this thread, or am I missing something? Link to comment Share on other sites More sharing options...
jaclaz Posted March 18, 2015 Share Posted March 18, 2015 My bad , it's here:http://www.msfn.org/board/topic/173642-mkprilog-batch-to-access-a-same-disk-under-two-different-interfaces/ (also corrected previous post) jaclaz Link to comment Share on other sites More sharing options...
Dave-H Posted March 18, 2015 Author Share Posted March 18, 2015 Thanks jaclaz!I'll check it out and let you know if I find any issues.It's been really fascinating doing this with you, and thanks for all your perseverance and patience with me at times!Cheers, Dave. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now