Setup .inf files

Chris Morgan cmorgan at alum.wpi.edu
Sat Feb 14 21:22:55 CST 2004


Here is a first pass at replacing winedefault.reg with a windows inf file and 
dll registration.  The registry entries in the inf file are not complete.  
Other than quite a few missed entries I've also left out the keys for 
Codepages and the Country List entries as these are pretty large(lots of 
typing, I'm lazy).  

setupregistry is a shell script that registers dlls with regsvr32 and then 
installs the inf file using rundll32.  Registering ddraw.dll results in a 
crash on my machine even though regsvr32 says it was registered successfully.

The best documentation I've found thus far for inf files, 
http://www.leeos.com/infdoc.html#Top, doesn't have anything about running 
programs from inside of an inf file.  If this is possible it would probably 
make more sense to have the inf file register the dlls.  

I've also attached a patch to implement InstallHinfSectionW() which passes the 
inf file to lower level setupapi functions for installation.  Wasn't sure 
what the root key parameter to SetupInstallFromInfSectionW() should be, set 
it to \\HKEY_CURRENT_USER for now.

Comments and questions are welcome.

Thanks,
Chris


* dlls/setupapi/install.c,parser.c,queue.c,setupapi.spec,setupx16.h,stubs.c
Chris Morgan <cmorgan at alum.wpi.edu>
Implement InstallHinfSectionW().  Add some TRACE()'s to aid in debugging.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: setupregistry
Type: application/x-shellscript
Size: 585 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20040214/ca9cc38c/setupregistry.bin
-------------- next part --------------
[version]
signature="$CHICAGO$"

[Strings]
ShellFolders="Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folder"
MciExtStr="Software\Microsoft\Windows NT\CurrentVersion\MCI Extensions"
Mci32Str="Software\Microsoft\Windows NT\CurrentVersion\MCI32"
Desktop="Control Panel\desktop"
CurrentVersion="Software\Microsoft\Windows\CurrentVersion"
FontSubStr="%CurrentVersion%\FontSubstitutes"

[WineRegistryEntries]
HKCU,%ShellFolders%,"Favorites",,"%25%\Favorites"
HKCU,%ShellFolders%,"StartUp",,"%25%\Start Menu\Programs\Startup"
HKCU,%ShellFolders%,"Desktop",,"%25%\Desktop"
HKCU,%ShellFolders%,"Programs",,"%25%\Start Menu\Programs"
HKCU,%ShellFolders%,"Fonts",,"%25%\Fonts"
HKCU,%ShellFolders%,"SendTo",,"%25%\SendTo"
HKCU,%ShellFolders%,"Start Menu",,"%25%\Start Menu"
HKCU,%ShellFolders%,"Templates",,"%25%\ShellNew"
HKCU,%ShellFolders%,"Recent",,"%25%\Recent"
HKCU,%ShellFolders%,"NetHood",,"%25%\NetHood"
HKCU,%ShellFolders%,"Personal",,"c:\My Documents"

HKU,%ShellFolders%,"Favorites",,"%25%\Favorites"
HKU,%ShellFolders%,"StartUp",,"%25%\Start Menu\Programs\Startup"
HKU,%ShellFolders%,"Desktop",,"%25%\Desktop"
HKU,%ShellFolders%,"Programs",,"%25%\Start Menu\Programs"
HKU,%ShellFolders%,"Fonts",,"%25%\Fonts"
HKU,%ShellFolders%,"SendTo",,"%25%\SendTo"
HKU,%ShellFolders%,"Start Menu",,"%25%\Start Menu"
HKU,%ShellFolders%,"Templates",,"%25%\ShellNew"
HKU,%ShellFolders%,"Recent",,"%25%\Recent"
HKU,%ShellFolders%,"NetHood",,"%25%\NetHood"
HKU,%ShellFolders%,"Personal",,"c:\My Documents"

[MCIExt]
HKLM,%MciExtStr%,"aifc",,"MPEGVideo"
HKLM,%MciExtStr%,"asf",,"MPEGVideo"
HKLM,%MciExtStr%,"asx",,"MPEGVideo"
HKLM,%MciExtStr%,"au",,"MPEGVideo"
HKLM,%MciExtStr%,"avi",,"AVIVideo"
HKLM,%MciExtStr%,"cda",,"CDAudio"
HKLM,%MciExtStr%,"lsf",,"MPEGVideo"
HKLM,%MciExtStr%,"lsx",,"MPEGVideo"
HKLM,%MciExtStr%,"mlv",,"MPEGVideo"
HKLM,%MciExtStr%,"m3u",,"MPEGVideo"
HKLM,%MciExtStr%,"mid",,"Sequencer"
HKLM,%MciExtStr%,"midi",,"Sequencer"
HKLM,%MciExtStr%,"mp2",,"MPEGVideo"
HKLM,%MciExtStr%,"mp2v",,"MPEGVideo"
HKLM,%MciExtStr%,"mp3",,"MPEGVideo"
HKLM,%MciExtStr%,"mpa",,"MPEGVideo"
HKLM,%MciExtStr%,"mpe",,"MPEGVideo"
HKLM,%MciExtStr%,"mpeg",,"MPEGVideo"
HKLM,%MciExtStr%,"mpg",,"MPEGVideo"
HKLM,%MciExtStr%,"mpv",,"MPEGVideo"
HKLM,%MciExtStr%,"mpv2",,"MPEGVideo"
HKLM,%MciExtStr%,"rmi",,"MPEGVideo"
HKLM,%MciExtStr%,"rmi",,"Sequencer"
HKLM,%MciExtStr%,"snd",,"MPEGVideo"
HKLM,%MciExtStr%,"wav",,"WaveAudio"
HKLM,%MciExtStr%,"wax",,"MPEGVideo"
HKLM,%MciExtStr%,"wm",,"MPEGVideo"
HKLM,%MciExtStr%,"wma",,"MPEGVideo"
HKLM,%MciExtStr%,"wmp",,"MPEGVideo"
HKLM,%MciExtStr%,"wmv",,"MPEGVideo"
HKLM,%MciExtStr%,"wmx",,"MPEGVideo"
HKLM,%MciExtStr%,"wvx",,"MPEGVideo"

[MCI32]
HKLM,%Mci32Str%,"AVIVideo",,"mciavi.drv"
HKLM,%Mci32Str%,"CDAudio",,"mcicda.drv"
HKLM,%Mci32Str%,"Sequencer",,"mciwave.drv"
HKLM,%Mci32Str%,"WaveAudio",,"mciqtz32.drv"

[Desktop]
HKLM,%Desktop%,"FontSmoothing",,"0"
HKLM,%Desktop%,"DragFullWindows",,"0"
HKLM,%Desktop%,"SmoothScroll",1,hex:00,00,00,00
HKLM,%Desktop%,"UserPreferencemask",1,hex:00,00,00,00

[OLECfg]
HKLM,"Software\Microsoft\OLE","EnableDCOM",,"Y"
HKLM,"Software\Microsoft\OLE","EnableRemoteConnect",,"N"

[CurrentVersion]
HKLM,%CurrentVersion%,"CommonFilesDir",,"c:\Program Files\Common Files"
HKLM,%CurrentVersion%,"FirstInstallDateTime",1,hex:21,81,7c,23
HKLM,%CurrentVersion%,"ProductId",,"12345-oem-0000001-54321"
HKLM,%CurrentVersion%,"ProgramFilesDir",,"c:\Program Files"
HKLM,%CurrentVersion%,"RegisteredOrganization",,"Change preferred organization in ~/.wine/system.reg"
HKLM,%CurrentVersion%,"RegisteredOwner",,"Change preferred owner in ~/.wine/system.reg"
HKLM,%CurrentVersion%\Setup,"SharedDir",,"C:\\%25%"
HKLM,%CurrentVersion%\Hotfix\Q246009,"Installed",,"1"

[Debugger]
HKLM,Software\Microsoft\Windows NT\CurrentVersion\AeDebug,"Debugger",,"winedbg --debugmsg -all %ld %ld"
HKLM,Software\Microsoft\Windows NT\CurrentVersion\AeDebug,"Auto",,"1"

[DirectX]
HKLM,Software\Microsoft\DirectX,"Version",,"4.09.00.0902"

[FontSubstitutes]
HKLM,%FontSubStr%,"Arial CE,238",,"Arial,238"
HKLM,%FontSubStr%,"Arial CYR,204",,"Arial,204"
HKLM,%FontSubStr%,"Arial Greek,161",,"Arial,161"
HKLM,%FontSubStr%,"Arial TUR,162",,"Arial,162"
HKLM,%FontSubStr%,"Courier New CE,238",,"Courier New,238"
HKLM,%FontSubStr%,"Courier New CYR,204",,"Courier New,204"
HKLM,%FontSubStr%,"Courier New Greek,161",,"Courier New,161"
HKLM,%FontSubStr%,"Courier New TUR,162",,"Courier New,162"
HKLM,%FontSubStr%,"Helv",,"Arial"
HKLM,%FontSubStr%,"Helvetica",,"Arial"
HKLM,%FontSubStr%,"MS Shell Dlg",,"Tahoma"
HKLM,%FontSubStr%,"Times",,"Times New Roman"
HKLM,%FontSubStr%,"Times New Roman CE,238",,"Times New Roman,238"
HKLM,%FontSubStr%,"Times New Roman CYR,204",,"Times New Roman,204"
HKLM,%FontSubStr%,"Times New Roman Greek,161",,"Times New Roman,161"
HKLM,%FontSubStr%,"Times New Roman TUR,162",,"Times New Roman,162"
HKLM,%FontSubStr%,"Tms Rmn",,"Times New Roman"

[Tapi]
HKLM,%CurrentVersion%\Telephony,"Perf1",1,"5045524a"
HKLM,%CurrentVersion%\Telephony,"Perf2",1,"50455246"

[IEInstaller]
HKLM,Software\Classes\CLSID\{6E449686-C509-11CF-AAFA-00AA00B6015C},,,"Microsoft Active Setup Engine"
HKLM,Software\Classes\CLSID\{6E449686-C509-11CF-AAFA-00AA00B6015C}\InProcServer32,,,"inseng.dll"
HKLM,Software\Classes\CLSID\{6E449686-C509-11CF-AAFA-00AA00B6015C}\InProcServer32,"ThreadingModel",,"Apartment"
HKLM,Software\Microsoft\Advanced INF Setup,,,""
HKLM,System\CurrentControlSet\Control\SecctionManager,,,""
HKLM,System\CurrentControlSet\Control\Windows,"CSDVersion",,"dword:00000600"
HKLM,System\CurrentControlSet\Services\VxD\MSTCP,,,""

[ShellMappings]
HKCR,.txt,,,"txtfile"
HKCR,.txt,"Content Type",,"text/plain"
HKCR,txtfile\shell\open\command,,,"c:\%25%\notepad.exe %1"
HKCR,txtfile\shell\print\command,,,"c:\%25%\notepad.exe /p %1"
HKCR,http\shell\open\command,,,"winebrowser %1"

[DefaultInstall]
AddReg=WineRegistryEntries,MCIExt,MCI32,Desktop,OLECfg,CurrentVersion,Debugger,DirectX,FontSubstitutes,Tapi,IEInstaller,ShellMappings

-------------- next part --------------
A non-text attachment was scrubbed...
Name: setupapi.patch
Type: text/x-diff
Size: 10805 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20040214/ca9cc38c/setupapi.bin


More information about the wine-devel mailing list