Link to home
Start Free TrialLog in
Avatar of jmj050997
jmj050997

asked on

Unattended (or cmdline) audio driver install

I have to setup many NT workstations unattended. I have no
problem with the video drivers, network drivers ... even those that don't support unattended installation: I successfully modified their oemsetup.inf.

ONE PROBLEM REMAINS: audio drivers.

I know the unattended setup doesn't support them. I used the sysdiff tool to install them by removing the ENUM line in the sysdiff.ini, but I don't think it's a good method because the generated inf file SIMPLY REPLACES the ENUM\HTREE\ROOT key by the value found while I launched the SYSDIFF, instead of adding the necessary LEGACY_DRIVER at the end of the value.

A solution might be to call the installer from the mmsys.cpl via command line parameters but I did not succeed.
I found that calling
RUNDLL32 SHELL32.DLL,Control_RunDLL mmsys.cpl,,4 launches the right applet, but that's all.
I also found a MediaClassInstaller function in mmsys.cpl, but I couldn't run it. I tried
RUNDLL32 MMSYS.CPL MediaClassInstaller Path\.inf InfOption
but it didn't work.

If anyone has a solution to install an audio driver via the command line, I would be very happy to hear from you.

Avatar of jmj050997
jmj050997

ASKER

Edited text of question
Adjusted points to 313
jmj, this is the only way I can think of getting in contact with you.  The question you answered for me regarding getting NET time on the Workstation, which I left unlocked for further answers has now expired.  I do however want to do the right thing and give you the points you deserve.  What is the best way to do this?  Do you want me to post a dummy question in a particular area for you to answer?regards Andrew
No thanks, I don't really care for points... I just want a better automatic installation procedure for nt, no more blue screens, and a pint of Guiness...

Regards,
jmj

ajpawels: After expiring they have an autograding that gives jmj a "B" or nowerdays a "C" if the answer make sense.

jmj: Are you sure you used SYSDIFF correctly ?
I suggest the following:
- start: sysdiff /snap before.inf
- install the drivers
- start: sysdiff /diff before.inf new.dif
- start: sysdiff /inf new.dif \temp

(if the new driver needs to reboot you can /diff before and after reboot)

this creates $OEM$ in \temp
From there you see which files were copied and which registry settings were changed. Of course not all settings are necesary, but you can easyly see which one belong to the driver setup.

This must work.


I know this works BUT the generated $OEM$\XXX.INF has a command that REPLACEs the ENUM\HTREE\Root\AttachedComponents KEY by the key found when sysdiff /diff was launched instead of simply ADDING the modification at the end of the value. SYSDIFF considers a REG_MULTI_SZ value as a whole and cannot generate a .INF that adds a new SZ at the end of a MULTI_SZ value.

This is a general problem with REG_MULTI_SZ keys. An other example is the Services\EventLog\Application\Sources KEY.

Ex:

 Computer A, CCS\Enum\Htree\Root\ac\0 = LEGACY_A1,LEGACY_A2
 Computer B, CCS\Enum\Htree\Root\ac\0 = LEGACY_B1,LEGACY_B2

On Computer A:
    - I use sysdiff /snap,
    - install my NEWDRV
    - launch sysdiff /diff
    - sysdiff /inf /m  --> I get a $oem$ with xxx.inf that reads

[AddKey]
HKLM,"SYSTEM\CCS\Enum\HTREE\Root\AttachedComponents\0",0,"LEGACY_A1,LEGACY_A2,LEGACY_NEWDRV"

Now what ? If I apply this XXX.INF to Computer B,

I get
-----
Computer B, HKLM\SYSTEM\CCS\Enum\Htree\Root\AttachedComponents =                    LEGACY_A1,LEGACY_A2,LEGACY_NEWDRV

Instead of LEGACY_B1,LEGACY_B2,LEGACY_NEWDRV

Then Computer B SEEMS TO work well for a while, but blue screens are not far away cuz an important part of the system registry is incorrect.

What I want is to launch a .BAT that adds an audio driver correctly on any computer: the .BAT should have the same effect on the system as the ControlPanel/Multimedia/AddDriver Applet.

I did it with the Sound Blaster AWE32 cards using the tool devpre.exe (hidden in the sp3 distrib) but this method only works with PNPISA soundboards.

BTW an other problem: Anyone successfully sysdiffed Delrina Fax Pro 8.0 ???? I always get an error message saying the modem is not set correctly when I apply the generated .INF.


Now I understan you!
I never run into this problem because I didn't remoce ENUM from the INI and didn't install soundcards.
What you are looking for is registry editor that adds something to a muli_SZ.

Which utilities did you try sofar?
Resourcekit?
Kixtart?
http://www.jsiinc.com/reg.zip

Maybe with kixtart you can first get the actual value, then add your string and finaly set the result.

I didn't instal any FAX software.
I tried everything I could (KiXtart, ResKit, ...) BUT the problem is that only the SYSTEM has write access to this key. The Administrator (or equivalent) only has read access.

I'm just finishing to code (C++) a reggrant.exe that may help...but the best would be to find a way to call the real MediaInstall routine, passing the INF and OPTION........


If only system has access, you are sure the INF in $OEM$ is applied? If yes, what about this:
Use a common utility to extract the actual ENUM key.
Use a small selfwritten programm or script to put the contents of the key found + the new value to add into a new INF file. I mean you have a INF file ready:

[AddKey]
                 HKLM,"SYSTEM\CCS\Enum\HTREE\Root\AttachedComponents\0",0,"$$DUMMY$$,LEGACY_NEWDRV"

a swap programm now exchanges $$DUMMY$$ with the actual value.

Then use the command from cmdlines.txt to apply the INF.

This way I did a lot userspecific configuration with WFW311.


Next idea:
You may be able to install using a macro utility which presses all te desired keys for you.


A Macro Utility is a good idea too. I tried WinBatch... it works but I must get a license (...) AND install a lot on the workstation before being able to use it.

The next macro utility i'm looking for is mstest.exe ... but I don't know where to find it and its documentation...
And what about my first idea. Did you tried it already. May it work?

Mstest is inside the SDK:
http://www.microsoft.com/kb/articles/q89/5/72.htm
http://www.microsoft.com/kb/articles/q93/9/20.htm

it seems to be freeware since it is included elsewhere like:
http://www.winsite.com/info/pc/win3/sounds/juker60.zip/index.html

ASKER CERTIFIED SOLUTION
Avatar of cer
cer

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you for your help ! The FLG_ADDREG_APPEND is exactly what I need !

I'm gonna post a new question on NT4 workstation, roaming profiles and .... INI FILES ....