Set default Audio Host during silent install, Windows 7

We install Audacity on most of my school’s computers, using silent install.

However, the default MME Audio Host does not work on our setups.

Is there any way to set Audacity to use Windows DirectSound (that is confirmed to be working) as default during the setup phase, or to set DirectSound as default for all users after install?

Modifying the audacity.cfg in the program directory does not seem to work, as the changes are not copied to a new user’s profile at first setup for that user.
Creating the “Audacity”-directory in the user’s AppData and copying the (empty/nulled out) audacity.cfg from the program folder with Host=Windows Direct Sound set does not work, either.

We still use Audacity ver. 2.0.2 for now, is this implemented in a newer version?

-I cannot find any documentation on this…

By default the host setting is a per user setting, so it needs to be defined in audacity.cfg.
auaciity.cfg is usually in:
Windows 2000/XP: Documents and SettingsApplication DataAudacity
Windows Vista/7: UsersAppDataRoamingAudacity

I think that should work, and would be the preferable solution, but for it to work you need to specify the recording and playback devices, for example:

Host=Windows DirectSound
RecordingDevice=Primary Sound Capture Driver
PlaybackDevice=Primary Sound Driver

If that does not work, another possibility:

If you create a folder in the same location as audacity.exe and call it “Portable Settings”, then Audacity will look for audacity.cfg in that folder and if found it will be used in preference to per-user settings. A down side of this is that if the user can write to audacity.cfg in the Portable Settings folder, then any changes will affect all users. If the user does not have permissions to write to that folder then you may get errors when Audacity attempts to do so, and user settings (including the “recent files” list) will not be saved. I’m not on Windows at the moment, but this is something that you could try.