Is it possible to add my own Windows service (myservice.exe) in a WinPE 64bit image? myservice.exe is 32bit applicatication that relies on the winusb driver.
How can I add (manually) my own service in a WinPE image? Or how can I start it after I boot from my WinPE image? sc.exe is not available in the image. Even if I added the right entries in the Registry for the service, it is not shown by wmic service. So net start service_name will return "the service name is invalid net helpmsg 2185"
Is it possible to inject the winusb drivers in a WinPE 5.0/10 (Windows 8.1/10) image?

- 1
- 4
-
1WinPE misses WOW64 support. – magicandre1981 Mar 30 '16 at 15:40
3 Answers
WinPE does not include WOW (Windows On Windows) therefore all of your apps and services must be the native bitness. 32 for 32 and 64 for 64.

- 11
- 1
I guess it's impossible to add custom services to WinPE (correct me if I'm wrong). However I was able to deceive WinPE by "merging" my service with existing one.
When I opened Task Manager in WinPE, I noticed that service defragsvc was stopped. I started Regedit.exe, navigated to HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\defragsvc
and removed values:
DependOnService
RequiredPrivileges
ServiceSidType
SvcMemHardLimitInMB
SvcMemMidLimitInMB
SvcMemSoftLimitInMB
I also removed subkey Parameters
, changed ErrorControl
to 0
and changed ImagePath
to my own executable.
After this modification I exported the defragsvc
key to a myservice.reg
file. Then I turned off WinPE, mounted WIM and added command
regedit /s X:\Windows\System32\myservice.reg
inside the startnet.cmd
file.
When WinPE is booted that way, you are able to start the service with net start defragsvc
.
Stefan, you can add Out-of-the-box drivers to a Windows image via Microsoft Deployment Toolkit (MDT). The current version is MDT 2013 Update 2, for Windows 10 deployments, MDT 2013 Update 1 is the one you need (minimum version).
You have the option to integrate INF driver files to your image which will be added then. Hope that helps!

- 11
- 1