简体   繁体   中英

Remove SQL Server database during uninstall of C# Winforms

I have created a MSI Installer via VS2010 Windows Installer .

I am able to setup the C# program, and able to attach the database to SQL Server Express.

How can I remove the .ldf file in my program files and delete the DB created during attachment to the SQL Server Express when I do a uninstall of my application?

How can I remove the .ldf file in my program files and delete the DB created during attachment to the ms sql express when I do a uninstall of my application?

Two words: CUSTOM ACTION. Protram a cusomto maction executed during uninstall.

Execute DROP DATABASE command in sql.

http://msdn.microsoft.com/en-us/library/ms178613.aspx

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM