Does .NET 4.0 come with Microsoft.Jet.OLEDB.4.0?
I want to distribute an app that uses "Microsoft.Jet.OLEDB.4.0" and .NET 4.0. I already found a way for my installer to download .NET 4.0 if required. I just want to know if this will automatically download "Microsoft.Jet.OLEDB.4.0" or do I also need to figure out a way to download it by itself. If yes, what exactly do I need to download and install on the user machine? (I'm using Inno Setup to create my installer). I don't use ClickOnce because I want to make an 开发者_高级运维standalone .exe.
No, .NET 4.0 does not come with Microsoft.Jet.OLEDB.4.0
You can download the Microsoft.Jet.OLEDB.4.0 installer from here: How to obtain the latest service pack for the Microsoft Jet 4.0 Database Engine
I'm not 100% of this but OLEDB should come in separate setup. You can download installer from
http://www.microsoft.com/downloads/en/details.aspx?familyid=C06B8369-60DD-4B64-A44B-84B371EDE16D&displaylang=en
Update, If you would like to bundle with your installer then you have to do with WIX http://wix.sourceforge.net/ , It is XML base project you may have to use the Votive (VS.NET Plug-In) - http://wix.sourceforge.net/votive.html
/* WiX Script */
<Property Id="QtExecCmdLine" Value="AccessDatabaseEngine.exe"/>
<CustomAction Id="InstallOLEDB" BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="immediate" Return="check" />
<InstallExecuteSequence>
<Custom Action="InstallOLEDB" After="..." />
</InstallExecuteSequence>
For more info of WiX and best place to get start at http://www.tramontana.co.hu/wix/
You would want this script for your Inno Setup:
jet4sp8.iss:
[CustomMessages]
jet4sp8_title=Jet 4
en.jet4sp8_size=3.7 MB
de.jet4sp8_size=3,7 MB
[Code]
const
jet4sp8_url = 'http://download.microsoft.com/download/4/3/9/4393c9ac-e69e-458d-9f6d-2fe191c51469/Jet40SP8_9xNT.exe';
procedure jet4sp8(MinVersion: string);
begin
//check for Jet4 Service Pack 8 installation
if fileversion(ExpandConstant('{sys}{\}msjet40.dll')) < MinVersion then
AddProduct('jet4sp8.exe',
'/q:a /c:"install /qb /l"',
CustomMessage('jet4sp8_title'),
CustomMessage('jet4sp8_size'),
jet4sp8_url);
end;
I assume you know what to do with the code so I'll leave you to it!
Good Luck!
Nateeo.
精彩评论