views:

412

answers:

2

I try to write vbscript, to remove the duplicated component GUID entry in component table of a MSI. But I always get 80004005 error, MSI API error.

Does it mean vbscript can't modify/delete on component table?

I do know Transform can.

my code snippet:

 DeleteQuery = "delete from component where component.component="+comp
 Set DeleteView = Msmdatabase.OpenView(DeleteQuery)
 DeleteView.Execute
 DeleteView.Close

The error happens during OpenView

thanks, William L.

A: 

Ooopss. I found out my error. The vbscript is not case-sensitive, SQL is not case-sensitive,

But Table and column names are case-sensitive!!!!

welemon
+1  A: 

Check the Windows Installer documentation, specifically the section SQL Syntax

Table names are limited to 31 characters. For more information, see Table Names. Table and column names are case-sensitive. SQL keywords are not case-sensitive.

sascha