Topic: Synchronize letters of disks  (Read 19742 times)

0 Members and 1 Guest are viewing this topic.

Synchronize letters of disks
« on: March 20, 2011, 12:23:16 AM »

NIKZZZZ

  • Code Baker
  • Jr. Chef
  • **
  • Date Registered: Feb 2011
  • Posts: 64
Hi All
Allows to synchronize letters of disks on the basis of the register of guest system.
So probably to appropriate to a Boot Disk letter Y: (it is searched on the marker file).

Regards,
Nikzzzz.

Re: Synchronize letters of disks
« Reply #1 on: March 20, 2011, 11:29:57 AM »

Lancelot

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 7004
Hi Nikzzzz,

I more or less understand the idea, and like it , put on the server to get others easy try too.
less part is:
with /Manual, I would expect, after selecting J:\ drive (with xp32 in it), utility reads registry of J: - xp32 and remounts all Gena drive letters following xp32 on J: (J: --> C: and others)

Maybe I miss something....

See you  :thumbsup:

Re: Synchronize letters of disks
« Reply #2 on: March 20, 2011, 11:23:51 PM »

NIKZZZZ

  • Code Baker
  • Jr. Chef
  • **
  • Date Registered: Feb 2011
  • Posts: 64
Hi, Lancelot
In /Manual mode it is necessary to choose Windows the catalogue, for example J:\Windows
Regards,
Nikzzzz.

Re: Synchronize letters of disks
« Reply #3 on: March 21, 2011, 03:47:41 AM »

ChrisR

  • Win7PE SE Baker
  • Grand Chef
  • *****
  • Date Registered: Mar 2011
  • Posts: 2809
I like the idea  :thumbsup:,

For Win7Pe_Se, 2aCD shared with me a script that does the same thing, with a little exe (DLMapper.exe) from Symantec Service Recovery Disk.
So I do not know if I can share it ! It is opensource here :smile:




Re: Synchronize letters of disks
« Reply #4 on: March 22, 2011, 01:50:10 AM »

Lancelot

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 7004
 :cancan:
Thanks for the hint Nikzzzz
It is very nice   :thumbsup:

ChrisR, I believe it also works niicely on Win7PE SE ;).

I was using mountvol to remap drives in the past to fit drive letters.... now no need to  :lol:

I put a tip on script interface, also selected default with manual option.
I believe everybody would like to have this at hand.
 :grin:

Re: Synchronize letters of disks
« Reply #5 on: March 23, 2011, 12:45:16 AM »

ChrisR

  • Win7PE SE Baker
  • Grand Chef
  • *****
  • Date Registered: Mar 2011
  • Posts: 2809
ChrisR, I believe it also works niicely on Win7PE SE ;).
I believe everybody would like to have this at hand.
yes I also think it is good  :grin:

I just test it on Win7Pe_Se (RunOnceEx -> RunOnce) on my HostOS win7 x86, I would test it after on my Host win7 x64.

I have an issue, the array $aMountGuest is empty.
MountedDevices is missing (HKLM\GuestSYSTEM\MountedDevices) after loading the guest hive system  (I have the other keys) !!! :confused:
Code: [Select]
RunWait('reg.exe load hklm\GuestSYSTEM "' & $sHiveSystemGuest & '\system32\config\system"', '', @SW_HIDE)

An idea about that :question:

Re: Synchronize letters of disks
« Reply #6 on: March 23, 2011, 01:23:31 AM »

Lancelot

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 7004
Hi ChrisR,

Here I tested with shortcut  (/Manual) not runonce etc. since personally to me, runonce should be an option and shortcut ready at hand.

on guest system hive there have to be mounteddevices key, somehow on loaded hive it seems missing there ?!?!
I have an old vista on one of my partitions (hehe, I guess last time I boot was 2 or more years ago) which I had tested yesterday with Gena and works ok. (vista partition made C: and others.....)

Re: Synchronize letters of disks
« Reply #7 on: March 23, 2011, 02:12:23 AM »

ChrisR

  • Win7PE SE Baker
  • Grand Chef
  • *****
  • Date Registered: Mar 2011
  • Posts: 2809
Hi ChrisR,

Here I tested with shortcut  (/Manual) not runonce etc. since personally to me, runonce should be an option and shortcut ready at hand.

on guest system hive there have to be mounteddevices key, somehow on loaded hive it seems missing there ?!?!
I have an old vista on one of my partitions (hehe, I guess last time I boot was 2 or more years ago) which I had tested yesterday with Gena and works ok. (vista partition made C: and others.....)
Hi Lancelot,

I have tested with both runonce and shortcuts and Yes, runonce should be an option and shortcut ready at hand.

On my guest system hive there have mounteddevices key, but in PE after load hive system, this key is missing ??? and therefore LetterSwap do not work (Perhaps a problem with my host win7 ?).

Another little thing for /manual perhaps, to indicate that we must select the Windows folder, It was unclear for me at first try.
$sHiveSystemGuest = FileSelectFolder("Select OS (eg c:\windows)", 1)
  or
$sHiveSystemGuest = FileSelectFolder("Select drive OS", 1) & '\windows'
 

Re: Synchronize letters of disks
« Reply #8 on: March 23, 2011, 02:19:16 AM »

Lancelot

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 7004
yep it was unclear untill Nikzzzz pointed too.
I put a tip to script interface ;).

I truely do not know w7, even never had installed on a virtual machine yet......

well folder name \windows is not a must
further,
the flag file I know is \***\system32\config\SYSTEM

so a seach mechanism, listing all os and put a final list as gui if more than 1 found would be the most confortable.
I hope Nikzzzz like the idea too ;)

Re: Synchronize letters of disks
« Reply #9 on: March 24, 2011, 01:17:34 AM »

NIKZZZZ

  • Code Baker
  • Jr. Chef
  • **
  • Date Registered: Feb 2011
  • Posts: 64
Hi.
Update script.
$sHiveSystemGuest = FileSelectFolder("Select OS (eg c:\windows)", 1) - It is added, thanks ChrisR
Log guiding is added
Regards,
Nikzzzz.


Re: Synchronize letters of disks
« Reply #10 on: March 24, 2011, 04:58:36 AM »

ChrisR

  • Win7PE SE Baker
  • Grand Chef
  • *****
  • Date Registered: Mar 2011
  • Posts: 2809
Update script.
$sHiveSystemGuest = FileSelectFolder("Select OS (eg c:\windows)", 1) - It is added, thanks ChrisR
Log guiding is added
Hi Nikzzzz,

Thank you for the update,, it's ok for the log and the "select OS"  :smile:

so a seach mechanism, listing all os and put a final list as gui if more than 1 found would be the most confortable.
I hope Nikzzzz like the idea too ;)
the idea is interresting also.

I still have my problem with reg load system, the key mounteddevices is missing for me, i don't know why ?
Code: [Select]
here the log
Command line:
/auto /log X:\Windows\Temp\Lswapp.log
Host system:
C - 0xBDE239490080000000000000
D - 0xBDE239490020D6FF13000000
Guest system: x:\windows

ila_rendered

Re: Synchronize letters of disks
« Reply #11 on: March 24, 2011, 05:13:57 AM »

ChrisR

  • Win7PE SE Baker
  • Grand Chef
  • *****
  • Date Registered: Mar 2011
  • Posts: 2809
In addition, I forgot.

In my case, when the key mounteddevices is missing, i have an @error and "reg unload hklm\GuestSYSTEM" is not made.
Quote
$sValueName = RegEnumVal($sKey, 1)
If @error <> 0 Then ContinueLoop         ;        <== In my case @error <> 0
LogOut("Key: " & StringReplace($sKey, 'GuestSYSTEM', 'SYSTEM') & @CRLF)
For $i = 1 To 999
   ...
Next
RunWait('reg.exe unload hklm\GuestSYSTEM', '', @SW_HIDE)
Next
RunWait('reg.exe unload hklm\GuestSYSTEM', '', @SW_HIDE)
:cheers:

Re: Synchronize letters of disks
« Reply #12 on: March 24, 2011, 07:31:00 AM »

ChrisR

  • Win7PE SE Baker
  • Grand Chef
  • *****
  • Date Registered: Mar 2011
  • Posts: 2809
Hi,

Ok  I found the problem with Win7PE SE , it is because "x:\windows" exists

by changing that, the program works very well  :thumbup:

Code: [Select]
Case "/auto"
$aDrives = DriveGetDrive("FIXED")
For $k = 1 To $aDrives[0]
        ; first drive (exitloop) and exclude drive X
If $aDrives[$k] <> "x:" And FileExists($aDrives[$k] & '\windows\system32\config\system') Then
$sHiveSystemGuest = $aDrives[$k] & '\windows'
ExitLoop
EndIf
Next

also

RunWait('reg.exe unload hklm\GuestSYSTEM', '', @SW_HIDE)    ;  after the loop (Next)

Maybe an additional parameter to exclude a drive and be compatible with PE2/3 projects.

 :cheers:


 

Re: Synchronize letters of disks
« Reply #13 on: March 24, 2011, 08:18:14 AM »

NIKZZZZ

  • Code Baker
  • Jr. Chef
  • **
  • Date Registered: Feb 2011
  • Posts: 64
Hi, ChrisR
More correctly :

Code: [Select]
If $aDrives[$k] <> EnvGet ( "SystemDrive" ) And FileExists($aDrives[$k] & '\windows\system32\config\system') Then ....
:cheers:

Regards,
Nikzzzz.



Re: Synchronize letters of disks
« Reply #14 on: March 24, 2011, 08:28:03 AM »

ChrisR

  • Win7PE SE Baker
  • Grand Chef
  • *****
  • Date Registered: Mar 2011
  • Posts: 2809
More correctly :
Code: [Select]
If $aDrives[$k] <> EnvGet ( "SystemDrive" ) And FileExists($aDrives[$k] & '\windows\system32\config\system') Then ....
Hi Nikzzzz,
Yes, OK,  thank you very much  :smile:

 :cheers:

Re: Synchronize letters of disks
« Reply #15 on: March 24, 2011, 08:42:37 AM »

NIKZZZZ

  • Code Baker
  • Jr. Chef
  • **
  • Date Registered: Feb 2011
  • Posts: 64
Update script.
Fixed bug , thanks ChrisR
Regards,
Nikzzzz.

Re: Synchronize letters of disks
« Reply #16 on: March 24, 2011, 07:54:26 PM »

Lancelot

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 7004
Hi ChrisR,

An idea  :w00t: to be tested by you:

attach an usb flash disk (ufd) to your hostos, it will get a drive letter, than change this drive letter to something else (let's say K:)
than safely remove this ufd
than plugin again
1st) does it get K: ????

IF answer yes:
safely remove this ufd
shutdown pc (not restart button, use shutdown button)
start pc
after boot attach same ufd to your hostos
2nd) does it get K: ????

 :lol:

Re: Synchronize letters of disks
« Reply #17 on: March 25, 2011, 10:00:40 AM »

ChrisR

  • Win7PE SE Baker
  • Grand Chef
  • *****
  • Date Registered: Mar 2011
  • Posts: 2809
Hi Lancelot,

I'll try this after the weekend and thank you Nikzzzz, LetterSwap works well :smile:

 :cheers:

Re: Synchronize letters of disks
« Reply #18 on: March 25, 2011, 11:49:53 AM »

ChrisR

  • Win7PE SE Baker
  • Grand Chef
  • *****
  • Date Registered: Mar 2011
  • Posts: 2809
Hi Lancelot,

finally, a bit of time to test

First thing, the safely remove Systray do not working in Win7PE SE.
and Hotswap! also (it works with MakePE3)
Hotswap! http://mt-naka.com/hotswap/index_enu.htm

start on my NetBook (no VM), attach an UFD, it gives me the letter E:
I change the letter with remount E: K:
Than safely remove this ufd and than plugin again,
The drive letter remains K:

Then safely remove this ufd and shutdown pc with the shutdown button
Start again the PC and attach the same UFD,
The drive letter, is as originally E:

you deduce what  :question:

ila_rendered
« Last Edit: March 25, 2011, 11:51:42 AM by ChrisR »

Re: Synchronize letters of disks
« Reply #19 on: March 25, 2011, 11:58:40 AM »

Lancelot

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 7004
Hi ChrisR,

yes  :thumbsup:

your test result proves / verifies, your mounteddevices key deleted when you shut down.

here (and so far all friends I have) , after Restart will get K: in the end of the test again.

Well, you are currently only one I know who use w7hostos ;) better to verify with some others to be sure if this is a w7 behaviour, or your user profile behaviour, or a setting behaviour (uac ! etc.) , or something else.... :cheers:

 

Powered by EzPortal