Jump to content











Photo
- - - - -

Help required with DcomLaunch/DiskPart


  • Please log in to reply
7 replies to this topic

#1 misty

misty

    Silver Member

  • Developer
  • 881 posts
  •  
    United Kingdom

Posted 29 April 2012 - 04:08 PM

@everyone
I'm not sure if this is the right (or best) place to post this request. Note to board admins - please feel free to move it to somewhere more appropriate.

I've been playing around with Dietmar's XPSP1 with full commandline and NTFS below 10 MB and have created a WinBuilder wrapper for one of his projects included in the thread.

I'm having trouble getting diskpart working if Windows XP Service Pack 2 or 3 source files are used - diskpart is however working fine if the source files are from XP Gold or Service Pack 1.

I therefore posted the following in the MiniXP thread -

...We are now now in the unfortunate position where diskpart is only working with Gold and SP1 sources, and USB Mass Storage is only working with SP2 and SP3...


...cdob responded with...

This rings a old bell: Bart added DComLaunch Service to enable diskpart at SP2 and up.
LiveXP adds DComLaunch at Register Factory API http://livexp.boot-l...gFactory.Script


...which led to...

@cdob
Thanks for the hints. I feel like I'm making some progress, however I can't get the DcomLaunch service working. I tried adding the following registry keys via a winbuilder script -


RegWrite,HKLM,0x7,"_XPCLI_SYSTEM\ControlSet001\Services\RpcSs","DependOnService","DcomLaunch",""

RegWrite,HKLM,0x4,"_XPCLI_SYSTEM\ControlSet001\Enum\Root\LEGACY_DCOMLAUNCH","NextInstance",0x1

RegWrite,HKLM,0x1,"_XPCLI_SYSTEM\ControlSet001\Enum\Root\LEGACY_DCOMLAUNCH\0000","Class","LegacyDriver"

RegWrite,HKLM,0x1,"_XPCLI_SYSTEM\ControlSet001\Enum\Root\LEGACY_DCOMLAUNCH\0000","ClassGUID","{8ECC055D-047F-11D1-A537-0000F8753ED1}"

RegWrite,HKLM,0x4,"_XPCLI_SYSTEM\ControlSet001\Enum\Root\LEGACY_DCOMLAUNCH\0000","ConfigFlags",0x0

RegWrite,HKLM,0x1,"_XPCLI_SYSTEM\ControlSet001\Enum\Root\LEGACY_DCOMLAUNCH\0000","DeviceDesc","DCOM Services"

RegWrite,HKLM,0x4,"_XPCLI_SYSTEM\ControlSet001\Enum\Root\LEGACY_DCOMLAUNCH\0000","Legacy",0x1

RegWrite,HKLM,0x1,"_XPCLI_SYSTEM\ControlSet001\Enum\Root\LEGACY_DCOMLAUNCH\0000","Service","DcomLaunch"

RegWrite,HKLM,0x1,"_XPCLI_SYSTEM\ControlSet001\Enum\Root\LEGACY_DCOMLAUNCH\0000\Control","ActiveService","DcomLaunch"

RegWrite,HKLM,0x1,"_XPCLI_SYSTEM\ControlSet001\Services\DcomLaunch","Description","DCOM Services"

RegWrite,HKLM,0x1,"_XPCLI_SYSTEM\ControlSet001\Services\DcomLaunch","DisplayName","DCOM Services"

RegWrite,HKLM,0x4,"_XPCLI_SYSTEM\ControlSet001\Services\DcomLaunch","ErrorControl",0x1

RegWrite,HKLM,0x1,"_XPCLI_SYSTEM\ControlSet001\Services\DcomLaunch","Group","Event Log"

RegWrite,HKLM,0x2,"_XPCLI_SYSTEM\ControlSet001\Services\DcomLaunch","ImagePath","svchost -k DcomLaunch"

RegWrite,HKLM,0x1,"_XPCLI_SYSTEM\ControlSet001\Services\DcomLaunch","ObjectName","LocalSystem"

RegWrite,HKLM,0x4,"_XPCLI_SYSTEM\ControlSet001\Services\DcomLaunch","Start",0x2

RegWrite,HKLM,0x4,"_XPCLI_SYSTEM\ControlSet001\Services\DcomLaunch","Type",0x20

RegWrite,HKLM,0x3,"_XPCLI_SYSTEM\ControlSet001\Services\DcomLaunch","FailureActions",00,00,00,00,00,00,00,00,00,00,00,00,01,00,00,00,00,00,00,00,02,00,00,00,60,ea,00,00

RegWrite,HKLM,0x1,"_XPCLI_SYSTEM\ControlSet001\Services\DcomLaunch\Enum","0","Root\LEGACY_DCOMLAUNCH\0000"

RegWrite,HKLM,0x4,"_XPCLI_SYSTEM\ControlSet001\Services\DcomLaunch\Enum","Count",0x1

RegWrite,HKLM,0x4,"_XPCLI_SYSTEM\ControlSet001\Services\DcomLaunch\Enum","NextInstance",0x1

RegWrite,HKLM,0x2,"_XPCLI_SYSTEM\ControlSet001\Services\DcomLaunch\Parameters","ServiceDll","rpcss.dll"

Sadly diskpart is still not working. I used the sc command to check whether dcomlaunch and rpcss services were working, and received the following errors -
Posted Image

Posted Image

RpcSs starts fine if the DependOnService DcomLaunch entry is removed.


I think that cdob's suggestion of adding the DcomLaunch service will resolve the Diskpart problem. The entries noted above seem to work fine in Windows PE, however MiniXP is not a PE environment.

Any help will be greatly appreciated.

Thanks in advance,

Regards,

Misty

#2 RoyM

RoyM

    Frequent Member

  • .script developer
  • 415 posts
  • Interests:"Booting and Owning".
  •  
    United States

Posted 29 April 2012 - 06:08 PM

RegWrite,"HKLM",0x2," == REG_EXPAND_SZ

// RegWrite,HKLM,0x2,"_XPCLI_SYSTEMControlSet001ServicesDcomLaunch","ImagePath","svchost -k DcomLaunch"
RegWrite,HKLM,0x2,"_XPCLI_SYSTEMControlSet001ServicesDcomLaunch","ImagePath","%SystemRoot%system32svchost -k DcomLaunch"
// RegWrite,HKLM,0x2,"_XPCLI_SYSTEMControlSet001ServicesDcomLaunchParameters","ServiceDll","rpcss.dll"
RegWrite,HKLM,0x2,"_XPCLI_SYSTEMControlSet001ServicesDcomLaunchParameters","ServiceDll","%SystemRoot%system32rpcss.dll"

#3 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7771 posts

Posted 29 April 2012 - 06:57 PM

No %sytemroot% in the Imagepath please. Just system32\... . Windows will put %systemroot% in front of the string by itself.
It's actually a trap to prevent the running of drivers from any non %systemroot% place.

:cheers:

#4 RoyM

RoyM

    Frequent Member

  • .script developer
  • 415 posts
  • Interests:"Booting and Owning".
  •  
    United States

Posted 29 April 2012 - 07:05 PM

Since it's a REG_EXPAND shouldn't there be something to expand i.e. %systemroot%
or is that the same idea behind system32

So This would be the same:
RegWrite,HKLM,0x2,"_XPCLI_SYSTEMControlSet001ServicesDcomLaunch","ImagePath","system32svchost -k DcomLaunch"
RegWrite,HKLM,0x2,"_XPCLI_SYSTEMControlSet001ServicesDcomLaunchParameters","ServiceDll","system32rpcss.dll"

As This:
RegWrite,HKLM,0x2,"_XPCLI_SYSTEMControlSet001ServicesDcomLaunch","ImagePath","%SystemRoot%system32svchost -k DcomLaunch"
RegWrite,HKLM,0x2,"_XPCLI_SYSTEMControlSet001ServicesDcomLaunchParameters","ServiceDll","%SystemRoot%system32rpcss.dll"

And in first example %SystemRoot% will automatically get inserted
so we have no REG_EXPAND issues.

#5 misty

misty

    Silver Member

  • Developer
  • 881 posts
  •  
    United Kingdom

Posted 29 April 2012 - 07:32 PM

Tested with -


RegWrite,HKLM,0x2,"_XPCLI_SYSTEM\ControlSet001\Services\DcomLaunch","ImagePath","%SystemRoot%\system32\svchost -k DcomLaunch"

RegWrite,HKLM,0x2,"_XPCLI_SYSTEM\ControlSet001\Services\DcomLaunch\Parameters","ServiceDll","%SystemRoot%\system32\rpcss.dll"


and -


RegWrite,HKLM,0x2,"_XPCLI_SYSTEM\ControlSet001\Services\DcomLaunch","ImagePath","system32\svchost -k DcomLaunch"

RegWrite,HKLM,0x2,"_XPCLI_SYSTEM\ControlSet001\Services\DcomLaunch\Parameters","ServiceDll","system32\rpcss.dll"


Neither one has made a difference - DcomLaunch is still not working.

Thanks anyway. Any more suggestions.

Misty

p.s. I checked some entries in a Windows XP SP1 registry hive. The following seem to be valid REG_EXPAND_SZ values -
  • %SystemRoot%\System32\dmadmin.exe /com
  • %SystemRoot%\System32\svchost.exe -k netsvcs
  • System32\drivers\dmboot.sys
Following was a REG_SZ value -
  • C:\WINDOWS\System32\imapi.exe
I wonder if %SystemRoot% is appended when the target has switches that also need to be run.

#6 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7771 posts

Posted 29 April 2012 - 07:51 PM

@RoyM
Imagepath is always of type Reg_Expand. Probably because it later get's add %systemroot% by the system, but i guess Reg-Sz would probably work just as well.

@Misty
There is no difference between:
imagepath = system32\some.exe
imagepath = %systemroot%\system32\some.exe
imagepath = some.exe

The first one is the correct entry.
The second get's %systemroot% striped away and later added back in.
The third has no path, so it is looked up, by checking the paths in the path variable.

The first one is the fastest, as it requires the least work. Though i doubt anyone will ever notice the difference.

:cheers:
  • RoyM likes this

#7 RoyM

RoyM

    Frequent Member

  • .script developer
  • 415 posts
  • Interests:"Booting and Owning".
  •  
    United States

Posted 29 April 2012 - 08:41 PM

Nice Info to Know, Thanks MedEvil
RoyM

#8 misty

misty

    Silver Member

  • Developer
  • 881 posts
  •  
    United Kingdom

Posted 01 May 2012 - 05:34 PM

@everyone
Thanks for the suggestions and a special thanks to cdob who put me on to DcomLaunch being the problem. The following registry entries are working in MiniXP with SP2 and SP3 source files -

RegWrite,HKLM,0x7,"_XPCLI_SOFTWARE\Microsoft\Windows NT\CurrentVersion\SvcHost","DComLaunch","DComLaunch"

RegWrite,HKLM,0x4,"_XPCLI_SOFTWARE\Microsoft\Windows NT\CurrentVersion\SvcHost\DComLaunch","CoInitializeSecurityParam",0x1

RegWrite,HKLM,0x4,"_XPCLI_SOFTWARE\Microsoft\Windows NT\CurrentVersion\SvcHost\DComLaunch","DefaultRpcStackSize",0x8



RegWrite,HKLM,0x4,"_XPCLI_SYSTEM\ControlSet001\Enum\Root\LEGACY_DCOMLAUNCH","NextInstance",0x1

RegWrite,HKLM,0x1,"_XPCLI_SYSTEM\ControlSet001\Enum\Root\LEGACY_DCOMLAUNCH\0000","Class","LegacyDriver"

RegWrite,HKLM,0x1,"_XPCLI_SYSTEM\ControlSet001\Enum\Root\LEGACY_DCOMLAUNCH\0000","ClassGUID","{8ECC055D-047F-11D1-A537-0000F8753ED1}"

RegWrite,HKLM,0x4,"_XPCLI_SYSTEM\ControlSet001\Enum\Root\LEGACY_DCOMLAUNCH\0000","ConfigFlags",0x20

RegWrite,HKLM,0x1,"_XPCLI_SYSTEM\ControlSet001\Enum\Root\LEGACY_DCOMLAUNCH\0000","DeviceDesc","DCOM Server Process Launcher"

RegWrite,HKLM,0x4,"_XPCLI_SYSTEM\ControlSet001\Enum\Root\LEGACY_DCOMLAUNCH\0000","Legacy",0x1

RegWrite,HKLM,0x1,"_XPCLI_SYSTEM\ControlSet001\Enum\Root\LEGACY_DCOMLAUNCH\0000","Service","DcomLaunch"

RegWrite,HKLM,0x1,"_XPCLI_SYSTEM\ControlSet001\Enum\Root\LEGACY_DCOMLAUNCH\0000\Control","ActiveService","DcomLaunch"



RegWrite,HKLM,0x1,"_XPCLI_SYSTEM\ControlSet001\Services\DcomLaunch","Description","Provides launch functionality for DCOM services."

RegWrite,HKLM,0x1,"_XPCLI_SYSTEM\ControlSet001\Services\DcomLaunch","DisplayName","DCOM Server Process Launcher"

RegWrite,HKLM,0x4,"_XPCLI_SYSTEM\ControlSet001\Services\DcomLaunch","ErrorControl",0x1

RegWrite,HKLM,0x1,"_XPCLI_SYSTEM\ControlSet001\Services\DcomLaunch","Group","Event Log"

RegWrite,HKLM,0x2,"_XPCLI_SYSTEM\ControlSet001\Services\DcomLaunch","ImagePath","%SystemRoot%\system32\svchost -k DcomLaunch"

RegWrite,HKLM,0x1,"_XPCLI_SYSTEM\ControlSet001\Services\DcomLaunch","ObjectName","LocalSystem"

RegWrite,HKLM,0x4,"_XPCLI_SYSTEM\ControlSet001\Services\DcomLaunch","Start",0x2

RegWrite,HKLM,0x4,"_XPCLI_SYSTEM\ControlSet001\Services\DcomLaunch","Type",0x20

RegWrite,HKLM,0x3,"_XPCLI_SYSTEM\ControlSet001\Services\DcomLaunch","FailureActions",00,00,00,00,00,00,00,00,00,00,00,00,01,00,00,00,00,00,00,00,02,00,00,00,60,ea,00,00

RegWrite,HKLM,0x1,"_XPCLI_SYSTEM\ControlSet001\Services\DcomLaunch\Enum","0","Root\LEGACY_DCOMLAUNCH\0000"

RegWrite,HKLM,0x4,"_XPCLI_SYSTEM\ControlSet001\Services\DcomLaunch\Enum","Count",0x1

RegWrite,HKLM,0x4,"_XPCLI_SYSTEM\ControlSet001\Services\DcomLaunch\Enum","NextInstance",0x1

RegWrite,HKLM,0x2,"_XPCLI_SYSTEM\ControlSet001\Services\DcomLaunch\Parameters","ServiceDll","system32\rpcss.dll"


There are also two file dependencies -
  • iphlpapi.dll
  • xpsp2res.dll
xpsp2res.dll - does not appear to be essential.

Unfortunately I cannot fully test Diskpart at the moment as I don't have a system I can risk using. It starts and appears to list disks and partitions without error.

Regards,

Misty




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users