To create a simple Setup Project:
1. Open VS.Net and create a new Windows Application project.
2. Open the menu “File” | “Add Project” | “New Project”. Select “Setup Project” under “Setup and Deployment Projects”.
3. Add the “Primary Output” of the Windows Application to the Setup Project.
To add the MSDE merge modules to the Setup Project:
4. Right click the Setup Project (e.g. “Setup1”) in the Solution Explorer and select “Add” | “Merge Module”.
5. Locate to the “MSM” folder which contains all the “.MSM” files. (Typically, this path is X:\MSDE\MSM where X is the drive letter of your CD drive.)
6. Press “CTRL + A” to select all the files in that folder. Click the “Open” button to add them to your Setup Project.
7. Repeat the steps 5 and 6 with the folder “MSM\1033”. Add all the “.MSM” files in the folder “MSM\1033” to the Setup Project as well.
8. Build the Setup Project.
To use Orca to manually modify the MSI:
9. Locate the MSI output of the Setup Project and use Orca to open it.
10. Go to the InstallExecuteSequence table.
11. By default, the Sequence of the action “GetSqlStates.XXXXXX” is 103. Let’s change it to 421, so that it is sequenced after the “StreamSuportFiles.XXXXXX” action.
12. Go to the InstallUISequence table. Change the sequence of “GetSqlStates.XXXXXX” to 421 as well.
For detailed information on the order of the 2 actions, you may refer to the following article:
PRB: The MSDE Installation May Fail and Error 126 Is Logged When You Are Using Windows Installer Software
http://support.microsoft.com/?id=321283
13. Go to the Property table. Add the following 2 rows:
Property Value
SqlInstanceName InstanceName
SqlSaPwd password
Here we specify “InstanceName” as the name of the MSDE instance and “password” as the password for the SA account. For more property options, you may visit the following link:
Using SQL Server Desktop Engine Merge Modules
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/distsql/distsql_8yeq.asp?frame=true
14. Go to the InstallExecuteSequence again.
15. Change the sequence of “InstallInitialize” from 1800 to 1799.
16. Change the sequence of “RemoveExistingProducts” from 1825 to 1800.
17. Save the MSI file and close Orca.
打印 | 张贴于 2004-09-07 22:37:00 | Tag:暂无标签
留言反馈
微软提供了NumInstalledInstances,IsInstanceNameValid两个API接口,如何调用呢?多谢~
最好能够做出一个完整的例子来,如果这样,广大开发者们真的是对楼主谢天谢地啦~!!!
1,先判断机器有没有安装.net framkwork,如果没有,则提示用户先安装。
>默认就有着功能。
2,判断有没有安装MSDE,版本是否为2000,如果没安装或版本不对,则提示用户。
>我没见过除了2000以外的MSDE版本。你可以通过检查注册表来看有没有指定的instance存在。
3,将数据库文件恢复到MSDE中。
>custom action中调用SqlCommand
1,先判断机器有没有安装.net framkwork,如果没有,则提示用户先安装。
2,判断有没有安装MSDE,版本是否为2000,如果没安装或版本不对,则提示用户。
3,将数据库文件恢复到MSDE中。
谢谢。
你可是用下面命令安装:
msiexec /i <filename.msi> /l*v c:\logfile.log
然后在c:\logfile.log里找到详尽的错误原因……