Solved

Unattended (or cmdline) audio driver install

Posted on 1997-05-29
13
812 Views
Last Modified: 2013-12-28
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.

0
Comment
Question by:jmj050997
  • 7
  • 5
13 Comments
 
LVL 2

Author Comment

by:jmj050997
ID: 1778672
Edited text of question
0
 
LVL 2

Author Comment

by:jmj050997
ID: 1778673
Adjusted points to 313
0
 

Expert Comment

by:ajpawels
ID: 1778674
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
0
 
LVL 2

Author Comment

by:jmj050997
ID: 1778675
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

0
 
LVL 5

Expert Comment

by:cer
ID: 1778676
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.


0
 
LVL 2

Author Comment

by:jmj050997
ID: 1778677
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.


0
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 5

Expert Comment

by:cer
ID: 1778678
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.
0
 
LVL 2

Author Comment

by:jmj050997
ID: 1778679
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........


0
 
LVL 5

Expert Comment

by:cer
ID: 1778680
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.


0
 
LVL 2

Author Comment

by:jmj050997
ID: 1778681
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...
0
 
LVL 5

Expert Comment

by:cer
ID: 1778682
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

0
 
LVL 5

Accepted Solution

by:
cer earned 410 total points
ID: 1778683
I think one of the SYSDIFF answers in my comments must work.

With sysdiff determine what entries you need to add.
The only problem one is the multi_sz entry. To solve this you must know the specific entries after the normal install. You must extract them after install and before running your INF file.
You must include the extracted values in your new INF at runtime.
I think all this can be easiely done by
regedit /e  to dump the registry to a file and then use "find" and "copy".

Best would be a multi_sz changing utility of course.
See
http://qwerty.maxwell.syr.edu/nt-tcl/
http://zazu.maxwell.syr.edu/nt-tcl/registry.html
sounds very promising. It has reg_set and reg_get for multi_sz
Did you check perl?

When I understand
 http://207.68.156.51/msdn/sdk/platforms/doc/sdk/win32/setupapi/src/setupapi_9.htm

correctly there is an official way to specify it directly in the INF file.

Here a short excerpt:

[add-registry-section]
reg-root-string, [subkey], [value-name], [flags], [value]
[reg-root-string, [subkey], [value-name], [flags], [value]]
.
flags
     Optional. Establishes the value data type and the AddReg item action. The flag value is a bitmap where the low word contains basic flags that define
     the general data type and AddReg item action. The high word contains values that more specifically identify the data type of the registry value. The
     high word is ignored by the 16-bit Windows 95 setup functions in SETUPX.DLL. The flags are defined as follows:
      Value
                                  Meaning
      FLG_ADDREG_BINVALUETYPE
                                  The value is “raw” data.
      FLG_ADDREG_NOCLOBBER
                                  Do not overwrite the registry key if it already exists.
      FLG_ADDREG_DELVAL
                                  Delete the value from the registry.
      FLG_ADDREG_APPEND
                                  Append a value to an existing value. This flag is currently supported only for REG_MULTI_SZ values.

0
 
LVL 2

Author Comment

by:jmj050997
ID: 1778684
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 ....

0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Recently Microsoft released a brand new function called CONCAT. It's supposed to replace its predecessor CONCATENATE. But how does it work? And what's new? In this article, we take a closer look at all of this - we even included an exercise file for…
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now