Jump to content

Disk Partition GUI in winPE


iamtheky

Recommended Posts

Is there a way to use in a standalone manner the "drive options (advanced)" GUI from a standard install?

http://www.sevenforums.com/attachments/tutorials/45431d1262556182-partition-hard-drive-windows-7-install-partition_08.png

We would like to offer this menu in our WDS pushes.

If that is not feasible, is there a quality partitioning GUI y'all would recommend for the PE environment.

*Just found IceMan's diskmgmt.msc gui stuff in the autoit forums, playing with that....

That blew up, after adding the files from the most recent mmc KB, diskmgmt.msc, and apphelp.dll. it blew up with a fat "class not registered" error. and any attempts to regsvr32 the dlls excepted with the "no entry point" error.

Edited by iamtheky
Link to comment
Share on other sites


Straight PE3 with a startnet that calls our autoit goodness:

We are building an extensible menu for deployments from WDS. The user selects a catalog from the treeview, we tell them how many indexes there are, then throw the GUI for them to partition the drive (currently it is behind the scenes, and can only handle a single drive, dividing it evenly based off the number of indexes. And if the # of drives = the number of indexes it will do one per). However, when we were thinking through edge cases like, how to adapt for someone that has 2 drives and 5 indexes and only wants 3 of the 5 indexes, we decided its best to just give them a GUI.

Edited by iamtheky
Link to comment
Share on other sites

You have to add some other files and registry keys in order to get the MMC console and Diskmgmt.msc to load. I have the info in some notes around here somewhere. Soon as I find them I can post the info.

The class not registered error is actually due to the registry information missing.

Link to comment
Share on other sites

Here is the autoit script I run that add the needed registry entries fro disk management to work in PE 3.0. It also enables or partially enables some of the other MMC consoles. Because of the way I ise PE to deploy images I don't add it directly to PE's registry I just load it at start up via my deployment application.

MMC_Registry.au3

As soon as I find the file list I will add that too. The information somehow was separated when I was transferring it to a new system.

Link to comment
Share on other sites

I believe these are all of the files you need for diskmgmt.msc to work with the above registry entries. Since I was enabling more than one my notes may have an extra file or be missing one, if it doesn't work let me know and I can dig further.

Files needed:

%SystemRoot%\system32\MMC.EXE

%SystemRoot%\System32\diskmgmt.msc

%SystemRoot%\system32\mmcbase.dll

%SystemRoot%\System32\mmc.exe

%SystemRoot%\System32\mmcbase.dll

%SystemRoot%\System32\mmcndmgr.dll

%SystemRoot%\System32\mmcshext.dll

%SystemRoot%\System32\apphelp.dll

%SystemRoot%\System32\dmdlgs.dll

%SystemRoot%\System32\dmdskmgr.dll

%SystemRoot%\System32\dmdskres.dll

%SystemRoot%\System32\dmdskres2.dll

%SystemRoot%\System32\dmintf.dll

%SystemRoot%\System32\dmocx.dll

%SystemRoot%\System32\dmutil.dll

%SystemRoot%\System32\dmvdsitf.dll

%SystemRoot%\System32\dmview.ocx

%SystemRoot%\System32\hhsetup.dll

Link to comment
Share on other sites

closer, now i get the GUI with a message "could not create snap-in Disk Management CLSID {DBFCA500-8C31-11D0-AA2C-00A0C9274983}"

Havent even googled it yet, in hopes you saw this in your efforts as that is a beastly amount of registry entries and certainly took a fair amount of time to gather. Once again thanks for the assist.

**I could not find:

%SystemRoot%\System32\dmdskres2.dll

%SystemRoot%\System32\dmvdsitf.dll

on my local system. I will try and hunt those down to see if they are the culprit, but they were also not referenced in your registry adds.

Found everything in a win7 sys32 and added those, the files fixed the error. It is showing the Drives, however the context menus are all blank, and anything i click it returns "windows could not report the error". I also get an error on launch of the GUI saying it cant run on anything prior to internet explorer 5.5...looking at that now

Edited by iamtheky
Link to comment
Share on other sites

Make sure these imported:

RegWrite("HKEY_CLASSES_ROOT\CLSID\{DBFCA500-8C31-11D0-AA2C-00A0C92749A3}", "", "REG_SZ", "DiskManagement.SnapInComponent")

RegWrite("HKEY_CLASSES_ROOT\CLSID\{DBFCA500-8C31-11D0-AA2C-00A0C92749A3}\InProcServer32", "", "REG_EXPAND_SZ", "%SystemRoot%\System32\dmdskmgr.dll")

RegWrite("HKEY_CLASSES_ROOT\CLSID\{DBFCA500-8C31-11D0-AA2C-00A0C92749A3}\InProcServer32", "ThreadingModel", "REG_SZ", "Apartment")

RegWrite("HKEY_CLASSES_ROOT\CLSID\{DBFCA500-8C31-11D0-AA2C-00A0C92749A3}\ProgID", "", "REG_SZ", "DiskManagement.SnapInComponent")

RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{DBFCA500-8C31-11D0-AA2C-00A0C92749A3}", "", "REG_SZ", "DiskManagement.SnapInComponent")

RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{DBFCA500-8C31-11D0-AA2C-00A0C92749A3}\InProcServer32", "", "REG_EXPAND_SZ", "%SystemRoot%\System32\dmdskmgr.dll")

RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{DBFCA500-8C31-11D0-AA2C-00A0C92749A3}\InProcServer32", "ThreadingModel", "REG_SZ", "Apartment")

RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{DBFCA500-8C31-11D0-AA2C-00A0C92749A3}\ProgID", "", "REG_SZ", "DiskManagement.SnapInComponent")

RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MMC\SnapIns\{dbfca500-8c31-11d0-aa2c-00a0c92749a3}", "NameString", "REG_SZ", "Disk Management")

RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MMC\SnapIns\{dbfca500-8c31-11d0-aa2c-00a0c92749a3}", "NameStringIndirect", "REG_SZ", "@dmdskres.dll,-65535")

RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MMC\SnapIns\{dbfca500-8c31-11d0-aa2c-00a0c92749a3}", "NodeType", "REG_SZ", "{312B59C1-4002-11d0-96F8-00A0C9191601}")

RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MMC\SnapIns\{dbfca500-8c31-11d0-aa2c-00a0c92749a3}", "Provider", "REG_SZ", "Microsoft Corp., VERITAS Software Corp.")

RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MMC\SnapIns\{dbfca500-8c31-11d0-aa2c-00a0c92749a3}", "Version", "REG_SZ", "1.0")

RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MMC\SnapIns\{dbfca500-8c31-11d0-aa2c-00a0c92749a3}", "About", "REG_SZ", "{FAC1D9C0-0296-11d1-A840-00A0C92C9D5D}")

And check HKLM\Software\Microsoft\Internet Explorer

Do values exist under this key? I seem to recall importing one or more of the following, I just copied them from a current system:

Build - REG_SZ - 98112

IntegratedBrowser - REG-DWORD - 1

MkEnabled - REG_SZ - Yes

svcKBFWLink - REG_SZ - http://go.microsoft.com/fwlink/?LinkId=216932

svcKBNumber - REG_SZ - KB2530548

svcUpdateVersion - REG_SZ - 9.0.1

svcVersion - REG_SZ - 9.0.8112.16421

Version - REG_SZ - 9.0.8112.16421

W2kVersion - REG_SZ - 9.0.8112.16421

Link to comment
Share on other sites

Think I jumped the gun on the context menu stuff, that was all directly related to mmc.exe forcing closed when detecting an ie version of lower than 5.5 (the autoit GUI was doing its damnedest to keep the diskmgmt window painted, and i was doing my best to click on stuff that had already been terminated).

I'll let you know how the IE stuff goes.

IE error is gone, however blank menus still persist (File, action...and all the top level menus and icons exist, all context menus are blank), all the Registry Entries I checked existed.

To confirm, Im just compiling your regwrites to an exe, and calling that from startnet prior to the mmc GUI. Does that seem kosher?

Edited by iamtheky
Link to comment
Share on other sites

Unless there is another file that I missed. This should be a full list of all the dependent files, but I believe thay are already in the build:

%systemroot%\system32\lpk.dll

%systemroot%\system32\usp10.dll

%systemroot%\system32\mfc42u.dll

%systemroot%\system32\ole32.dll

%systemroot%\system32\oleaut32.dll

%systemroot%\system32\odbc32.dll

%systemroot%\system32\shlwapi.dll

%systemroot%\system32\uxtheme.dll

%systemroot%\system32\duser.dll

%systemroot%\system32\imm32.dll

%systemroot%\system32\mscft.dll

%systemroot%\system32\katrack.dll

%systemroot%\system32\odbcint.dll

%systemroot%\system32\mfc42loc.dll

%systemroot%\system32\dwwin.exe

%systemroot%\system32\dui70.dll

%systemroot%\system32\wtsapi32.dll

%systemroot%\system32\rpcss.dll

%systemroot%\system32\urlmon.dll

%systemroot%\system32\iertutil.dll

%systemroot%\system32\wininet.dll

%systemroot%\system32\normaliz.dll

%systemroot%\system32\clbcatq.dll

%systemroot%\system32\apphelp.dll

%systemroot%\system32\ntdll.dll

%systemroot%\system32\kernel32.dll

%systemroot%\system32\kernelbase.dll

%systemroot%\system32\gdi32.dll

%systemroot%\system32\user32.dll

%systemroot%\system32\msvcrt.dll

%systemroot%\system32\rpcrt4.dll

%systemroot%\system32\advapi32.dll

%systemroot%\system32\sechost.dll

%systemroot%\system32\msctf.dll

%systemroot%\system32\katrk32.dll

%systemroot%\system32\apisetschema.dll

%systemroot%\system32\cryptbase.dll

%systemroot%\system32\sspicli.dll

%systemroot%\system32\shell32.dll

%systemroot%\system32\mmc.exe.local

%systemroot%\system32\msxml3.dll

%systemroot%\system32\msxml3r.dll

%systemroot%\system32\profapi.dll

%systemroot%\system32\dmdskres.dll

%systemroot%\system32\dmutil.dll

%systemroot%\system32\dmdskres2.dll

%systemroot%\system32\dwmapi.dll

%systemroot%\system32\oleacc.dll

%systemroot%\system32\oleaccrc.dll

%systemroot%\system32\cryptsp.dll

%systemroot%\system32\rsaenh.dll

%systemroot%\system32\rpcrtremote.dll

%systemroot%\system32\propsys.dll

%systemroot%\system32\ntmarta.dll

%systemroot%\system32\mlang.dll

%systemroot%\system32\xmllite.dll

%systemroot%\system32\version.dll

%systemroot%\system32\dmdlgs.dll

%systemroot%\system32\dmview.ocx

%systemroot%\system32\sxs.dll

%systemroot%\system32\atl.dll

%systemroot%\system32\stdole2.tlb

%systemroot%\system32\vds_ps.dll

%systemroot%\system32\dmvdsitf.dll

%systemroot%\system32\en-us\dmdskres2.dll.mui

C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.17514_none_41e6975e2bd6f2b2\comctl32.dll (may have a different path depending upon patch level)

C:\Windows\Globalization\Sorting\SortDefault.nls (I don't recall pulling this one)

Link to comment
Share on other sites

  • 3 weeks later...

Hi

I have all this DLLs and Autoit file - can some one explain me how to put this to work in winPe... (I, mean diskmgmt.msc on PE 3.1)

- reg the entries of autoit to winpe...

- copy dll's to winpe

someone is already reworked this ?

Bes Regards

Link to comment
Share on other sites

Just replicated what I did before for WinPE 3.0 or 3.1.

Use the MMC_registry.au3 file above to import the registry keys needed.

You also need to set values for the following, I did not add them to the above AU3 file in case others reading this already have IE added to their PE build, I do not but you need these values for MMC.exe to run:

HKLM\Software\Microsoft\Internet Explorer

Build - REG_SZ - 98112

svcUpdateVersion - REG_SZ - 9.0.1

svcVersion - REG_SZ - 9.0.8112.16421

Version - REG_SZ - 9.0.8112.16421

W2kVersion - REG_SZ - 9.0.8112.16421

Here are the files you need to have in your WIM file in the correct directories:

c:\windows\system32\dwwin.exe

c:\windows\system32\diskmgmt.msc

c:\windows\system32\mmc.exe

c:\windows\system32\mmcbase.dll

c:\windows\system32\mmcndmgr.dll

c:\windows\system32\mmcshext.dll

c:\windows\system32\apphelp.dll

c:\windows\system32\dmdlgs.dll

c:\windows\system32\dmdskmgr.dll

c:\windows\system32\dmdskres.dll

c:\windows\system32\dmdskres2.dll

c:\windows\system32\dmintf.dll

c:\windows\system32\dmocx.dll

c:\windows\system32\dmutil.dll

c:\windows\system32\dmvdsitf.dll

c:\windows\system32\dmview.ocx

c:\windows\system32\hhsetup.dll

c:\windows\system32\en-US\mmc.exe.mui

c:\windows\system32\en-US\mmcbase.dll.mui

c:\windows\system32\en-US\mmcndmgr.dll.mui

c:\windows\system32\en-US\mmcshext.dll.mui

c:\windows\system32\en-US\dmdskres.dll.mui

c:\windows\system32\en-US\dmdskres2.dll.mui

Link to comment
Share on other sites

in the correct directories:

That may be what got me last time, I think I threw them all in sys32, rather than their respective folders, I'll retry this week.

Thanks IceMan, I got distracted with other issues and this nicety fell by the wayside.

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...