# Getting ProductVersion from MSI

**URL:** https://www.finalbuilder.com/forums/t/getting-productversion-from-msi/610
**Category:** Discussion
**Created:** [October 9, 2007, 9:52am UTC](https://www.finalbuilder.com/forums/t/getting-productversion-from-msi/610 "2007-10-09T09:52:58Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![sean.flook](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/s/a5b964/32.png) [@sean.flook](https://www.finalbuilder.com/forums/u/sean.flook)
#### Post date: [October 9, 2007, 9:52am UTC](https://www.finalbuilder.com/forums/t/getting-productversion-from-msi/610/1 "2007-10-09T09:52:58Z")

</div>

Hi,

I am trying to get the value for the ProductVersion from an MSI.&nbsp; I have tried to use the MSI Generic action, but all the SQL statements I have tried fail.

I have tried the following:

- SELECT ProductVersion FROM Property
- SELECT \* WHERE Property='ProductVersion'

Regards

Sean Flook

---

<div class="post-metadata">

### Author: ![paulsamways](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/p/e8c25b/32.png) [@paulsamways](https://www.finalbuilder.com/forums/u/paulsamways)
#### Post date: [October 10, 2007, 1:20am UTC](https://www.finalbuilder.com/forums/t/getting-productversion-from-msi/610/2 "2007-10-10T01:20:57Z")

</div>

Hi Sean,   
  
 Here is the SQL statement that retrieves the ProductVersion from the MSI database.   
  
 SELECT Value FROM Property WHERE Property=‘ProductVersion’   
  
 Regards,   
 Paul.

---

<div class="post-metadata">

### Author: ![sean.flook](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/s/a5b964/32.png) [@sean.flook](https://www.finalbuilder.com/forums/u/sean.flook)
#### Post date: [October 10, 2007, 9:29am UTC](https://www.finalbuilder.com/forums/t/getting-productversion-from-msi/610/3 "2007-10-10T09:29:35Z")

</div>

Hi Paul,   
  
 Thanks for that, it has done the trick nicely   
  
 Regards   
 Sean

---

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [October 6, 2010, 3:06am UTC](https://www.finalbuilder.com/forums/t/getting-productversion-from-msi/610/4 "2010-10-06T03:06:13Z")

</div>

I tried this to get the version of a previous MSI file so I can create a backup of that file in a directory w/ the version as it's name.

I'm seeing two issues though:

1. Succeeding runs of the action fail because it can't open the MSI file. The first two runs work w/o this error.

2. Once the version is captured into variable, I try to move the MSI file into the version folder, but it fails; says the MSI file is being used by another process.

Now, these two issues seem to denote that there's a file lock existing on the MSI after the query runs.

Got any solution for this? Or a workaround perhaps?

BTW, I'm using FB 6.

&nbsp;

Thanks!
