Hello,
To get the size of the database you can create a
sql query in the
SQL Page. For example, the following script can retrieve the size of the selected database:
Code: Select all
SELECT SUM((size*8)/1024) SizeMB FROM sys.master_files WHERE DB_NAME(database_id) = 'Selected_database'
In order to get the values of Drive Space Information, you can set the
AiEarlyValidate property in the custom actions page using the predefined
Set installer property.
The drive space requirements validation are done by Windows Installer through some standard actions which stores their values in the following properties:
- [PrimaryVolumeSpaceRequired]
[PrimaryVolumeSpaceAvailable]
[PrimaryVolumeSpaceRemaining]
The sample project is attached to this thread, so if you are interested to take a look directly at my project, you are more than welcome to download the ZIP file.
If you have any questions, please let me know.
Best regards,
Dan
FOLLOW US
Get the latest news in Application Packaging