Jump to content

system havn't audio streaming (no sound)on WIN7 PE,after load ADD


Robell_Liu

Recommended Posts

I builded a win7 PE used the WAIK for windows 7 base on the winpe.chm help document.

1: add the win7 pe package using the tool of "dism.exe"

2:add the hdaudio.inf ,hdaudiobus.inf offline driverinstallation using the tool of "dism.exe"

3:boot from UFD WIN7 PE ,and load all of the x:\windows\inf \*.inf using the drvload.exe ,register DLL files in the x:\windows\system32 using the regsvr32.exe in the "startnet.cmd"

4:Run "singen.exe /time:20000" in dos-command WIN7 PE , then NO audio output , It's same like the need to add some audio service such as (SVCHOST,)in win7 pe at first .

Could you help me on the audio function in WIN 7 PE( dos-command windows)

Link to comment
Share on other sites


why need sound on dos shell?

*did you add wdma_usb.inf, wdmaudio.inf. add the files mentioned in this inf files to related folders. comment out cpyfiles sections with comma ";" or use infcachebuilder commandline tool

*add

[HKEY_LOCAL_MACHINE\SYSTEM_00\ControlSet001\services\AudioEndpointBuilder]

[HKEY_LOCAL_MACHINE\SYSTEM_00\ControlSet001\services\AudioSrv]

services

*change RequiredPrivileges to "SeChangeNotifyPrivilege" only on audiosrv.

*add AudioEndpointBuilder and AudioSrv to

[HKEY_LOCAL_MACHINE\SOFTWARE_00\Microsoft\Windows NT\CurrentVersion\Svchost]

*add

[HKEY_LOCAL_MACHINE\SYSTEM_00\Setup\AllowStart\AudioEndpointBuilder]

[HKEY_LOCAL_MACHINE\SYSTEM_00\Setup\AllowStart\AudioSrv]

theese are manuel methods. and i don't know how you will load sound card drivers in command shell. maybe can use inf loading and hwpnp. why don't you build with winpe builders?

Edited by Kullenen_Ask
Link to comment
Share on other sites

Hi Kullenen_Ask ,

Thanks for your help,it's still doesn't worked following you method. And I builded this dos-shell windows 7 PE for automatic testing so don't need to GUI.

I couldn't find the below register key in the win7 system , So i don't know how to write the sub key information from "AllowStart\AudioEndpointBuilder" ,"Setup\AllowStart\AudioSrv"

[HKEY_LOCAL_MACHINE\SYSTEM_00\Setup\AllowStart\AudioEndpointBuilder]

[HKEY_LOCAL_MACHINE\SYSTEM_00\Setup\AllowStart\AudioSrv]

1:

I updated the register in offline mode

reg.exe load HKLM\NewSys x:\winpe_x86\mount\windows\system32\config\system

reg.exe load HKLM\NewSFT x:\winpe_x86\mount\windows\system32\config\software

reg.exe import AudioEndpointBuilder.reg ; (was copied from win7 system)

reg.exe import AudioSrv.reg ; (was copied from win7 system)

reg.exe import Svchost.reg ; (was copied from win7 system)

reg.exe import AudioEndpointBuilder.reg ; (was copied from win7 system)

2:

and install the wdmaudio.inf ,hdaudio.inf,hdaudiobus.inf used the dism.exe in offline mode.

3:copy the *.dll files (related audio device) from win7 system to x:\winpe_x86\mount\windows\system32

Link to comment
Share on other sites

I couldn't find the below register key in the win7 system , So i don't know how to write the sub key information from "AllowStart\AudioEndpointBuilder" ,"Setup\AllowStart\AudioSrv"

[HKEY_LOCAL_MACHINE\SYSTEM_00\Setup\AllowStart\AudioEndpointBuilder]

[HKEY_LOCAL_MACHINE\SYSTEM_00\Setup\AllowStart\AudioSrv]

Just create empty keys. There are a few entries in there should be like them. Very easy. You can add mmcss service too

reg.exe import AudioSrv.reg ; (was copied from win7 system)

Did you change RequiredPrivileges to "SeChangeNotifyPrivilege" only on audiosrv.??? Mount system hive and browse to audiosrv. You will see RequiredPrivileges key in there. There are 3 items. Delete last 2 and left

SeChangeNotifyPrivilege only.

and install the wdmaudio.inf ,hdaudio.inf,hdaudiobus.inf used the dism.exe in offline mode.

Also add ks.inf. Did you offline integrated also your sound cards drivers? I don't think offline adding audio drivers will be usefull. It always continue to complain not to find files about "drmk.sys,drmkaud.sys,portcls.sys,sysfxui,etc." in inf folder. It shouldn't complain and search sys files in inf folder. If you don't want to edit inf files. add all sys dll files from system32\driverstore\filerepisotry\*ks.inf*;*wdmaudio.inf*;*hdaudio*;*hdaudiobus.inf * etc to system32\inf folder too. Thats why i comment out cpyfiles sections.

Also add mmcss service to your winpe services registry and svchost. And add software\multimedia

There are so many parameters. You can not have audio only adding your soundcard drivers offline with dism. Also winpe will not load hardware drivers automatic else then networkcard. First when you run taskmgr.exe from command prompt you should see 3 audio services in the list. Then select them to run from right click, see all running or work to get them run. After try to load your soundcard.

Download makepe3.exe and browse inside with winrar under folder structure you will find the audio related inf and sys files. add them to you winpe structure.

Edited by Kullenen_Ask
Link to comment
Share on other sites

reg.rarHi Kullenen_Ask ,

Many thanks for your help :). I saw the "AudioEndpointBuilder","Audiosrv" sevice in the taskmgr was stoped ,and couldn't start those sevices by manual ,

Pop up the warning error message after start the service by manual:

"The operation couldn't be completed ,the executable program that this service is configured to run in does not implement the service."

The attach files is the my register:

I configed drmk.sys,drmkaud.sys ,ks.inf*;*wdmaudio.inf*;*hdaudio*;*hdaudiobus.inf ,and copy the dll ,sys,..to \windows\system32 , windows\inf \windows\system32\drivers....

Online register the *.dll , *.ax, *.acm as below

for %%f in (*.dll) do regsvr32 /s %%f|@echo ..%%f

for %%f in (*.ax) do regsvr32 /s %%f|@echo ..%%f

for %%f in (*.acm) do regsvr32 /s %%f|@echo ..%%f

Link to comment
Share on other sites

Pop up the warning error message after start the service by manual:

"The operation couldn't be completed ,the executable program that this service is configured to run in does not implement the service."

Meaning of this error is there are no "AudioEndpointBuilder","Audiosrv" entries under software\windowsnt\svchost key. Could be also there is no sub services that theese services depend to doesn't exist under svchost registry.

Also add what i said.

Also add mmcss service to your winpe services registry and svchost. And add software\multimedia

Edited by Kullenen_Ask
Link to comment
Share on other sites

  • 4 years later...

Hello Kullenen_ask,

 

I know this topic is very old but ...

 

I hope you work on winpe10. I appreciate your work and your comments in forums. I hope i don't disturb you. My English is very poor.

 

With winpe10, the desktop of explorer is more confortable than winpe5. The taskbar is ok. I also get wifi, mmc...

 

Actually, i'm trying to put audio/sound in winpe10 manually. ​ But it doen't work.

 

 

To avoid the problems with the registry, I copy entierly some sections clsid, svchost,etc.
i also copy Ks.inf in x:\windows\inf and many other files.
I track with procmon​64.

 

With PowerShell, I install the 2 services AudioEndPointBulder and AusioSrv. I modify the requestPrivilege as you said.

I install with drvload the driver for my sound card. I get icône and all animations in the notification bar are aok. With a right clic, I open "speakers". I clic on "test" and get the messagebox "Unable to read the test tone".

And in devmgmt.msc, y see in "others périphériques" that "Audio evice on Hight Definition Audio Bus" have no installed drivers​. Is it necessary ?

I try "update driver" and ask to search in the hard disk where Windows10 is ok with this card ( on the same pc ).

I get the message " file not found". I look in x:\windows\inf\setupapi.dev.log and found :

"driver package 'hdaudio​​' is configurable

copying 'e:\Windows\inf\hda​udio.inf' to x:\windows\system32\driverstore\temp\...'

error installing file (​0x00000002)

error 2​ the system cannot find the file specified

     SourceFile : 'e:\Windows\inf\hdaudio.sys

"

So i copy hdaudio.inf, hdaudio.sys in x:\inf and try again to update driver.

I get the message​​​ "no .cat". I look again in x:\windows\inf\setupapi.dev.log and found :

"

copying 'x:\inf\hdaudio.inf' to x:\...\driverstore\...​

copying 'x:\inf\hdaudio.sys' to x:\...\driverstore\...​

{driverstore import valid​ate}

driver package does not contain a catalog file and code integrity is in 'test signing" mode --> i modified bcd for that

"

i don't find the .cat in E:\Windows\System32\CatRoot\{F750E6C3-38EE-11D1-85E5-00C04FC295EE}, the sound Ok in this os.

the file hdaudio​.inf does not contain in section [version] a reference to the cat

 

 

Same error with drvload​.exe of course.

 

so my questions :

   is hdaudio.sys necessary? if yes, where is the .cat? how can i install this hdaudio.sys in the boot.wim? Offline? manually in registry after loaded it?

 

Have you get audio in winpe10?

​thanks for your help

Merci.​​

 

Link to comment
Share on other sites

  • 1 month later...
I found a solution ...

Background of my winpe10build10240:
- dwm-coremessagingRegistrar installed with regedit
- hdaudio.inf installed in off-line mode with dism /add-driver

Then, after starting winpe and launched by startnet.cmd, this powershell code loads hdaudio, starts the AudioEndpointBuilder service
modifies acl of the key created by the AudioEndpointBuilder, start the service AudioSrv, and then modifdie key "shell" to launch "explorer"
 
the code PS ( yes, it's bad, too many start-sleep but it's work for me ) :
 
drvload d:\sourceDesAjouts\audio\hdaudio\hdaudio.inf
start-sleep -s 1
 
# start service AudioEndpointBuilder
write-host -ForegroundColor green "`nAudio : start service AudioEndpointBuilder"
Start-Service AudioEndpointBuilder
start-sleep -s 1
 
# modif acl
write-host -ForegroundColor green "`nAudio : on modifie les acl de $c"
 
$c='HKLM:\SOFTWARE\MICROSOFT\Windows\CurrentVersion\MMDevices\Audio\Render\'
$cibles = gci $c | %{$_.pspath}|%{gci $_}|?{$_.name -ilike "*\properties"}|%{$_.pspath}
# on lit une acl
$aclBase = get-acl 'HKLM:\SOFTWARE\MICROSOFT\Windows\CurrentVersion\MMDevices\Audio\Render'
# on crée les ace pour les comptes de service
$rule1=New-Object System.Security.AccessControl.RegistryAccessRule("NT SERVICE\Audiosrv","FullControl","Allow")
$rule2=New-Object System.Security.AccessControl.RegistryAccessRule("NT SERVICE\AudioEndpointBuilder","FullControl","Allow")
# on ajoute ces 2 ace dans l'acl finale pour les 4 clés
foreach ($cible in $cibles){
    $aclBase.SetAccessRule($rule1)
    $aclBase.SetAccessRule($rule2)
    $aclBase | set-acl -Path $cible
}
 
# start service audiosrv
write-host -ForegroundColor green "`nAudio : start service audiosrv"
Start-Service audiosrv

 

it is surprising accounts and they work in theses acl of my winpe10.

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