Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 13th, 2005, 08:20 AM
Authorized User
Join Date: Dec 2004
Location: Salo, Loimaa, , Finland.
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to eelisMX
Default INSERT query using WiRunSQL.vbs (Msi file)


I'm trying to automate post-build updates to the MSI file. The UPDATE query
worked fine, but I have an error on the INSERT query.
The INSERT query is as follows:
Cscript WiRunSQL.vbs Setup.msi "INSERT INTO Registry
The error is :

Msi API Error 80004005: OpenView,Sql
1:2227 2:Setup.msi 3:Key 4: INSERT INTO Registry ... (all the query syntax)

Error 2227 is defined as: Database: [2]. Invalid identifier '[3]' in SQL query: [4].
in the following MSDN - (http://msdn.microsoft.com/library/de...r_messages.asp)

I couldn't track any invalid identifier in the 'Key' value nor in
'Registry' value on the query. Furthermore, the raw was successfully added to
the Msi using Orca and hard-code.

Any suggestions..... thanks!
Reply With Quote
  #2 (permalink)  
Old February 21st, 2011, 03:30 AM
Registered User
Join Date: Feb 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Update Query for MSI Registry table


I am trying to update registry root value from 2 to 0 for (HKLM\Software\Classes).

But i am unable to execute the query fro regisrt table. Could any one of them please help me...

Below is the code

Set installer = CreateObject("WindowsInstaller.Installer")
' Open database
'MsgBox (MSI)
MSI = "C:\Documents and Settings\191936\Desktop\JH\Oracle_UPK_V3.5.1.wsi"
Dim databasePath: databasePath = MSI
openMode = msiOpenDatabaseModeReadOnly
Dim database: Set database = installer.OpenDatabase(databasePath, 1)
Query = "SELECT * From Registry"
Set view = database.OpenView(Query)
Set record = view.Fetch
If record Is Nothing Then Exit Do
columnCount = record.FieldCount
rowdata = Empty
delim = " , "
i = 0
For Column = 1 To columnCount
rowdata1 = record.stringdata(2)
If rowdata1 = "2" Then
classdata = Left(record.stringdata(3), 17)
reg = record.stringdata(1)
If classdata = "SOFTWARE\Classes\" Then
MsgBox (record.stringdata(3))
Queryreg = "UPDATE Registry SET ROOT='0' WHERE Registry='registry6'"
MsgBox (Queryreg)
Set viewreg = database.OpenView(Queryreg)
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I attach a file to an email in my .vbs file savoym VBScript 3 July 2nd, 2011 08:02 AM
not able to acces vss database thru MSI file neha_mca431 VS.NET 2002/2003 1 August 7th, 2008 04:14 AM
Msi file - InstallShield bijgupt Other Programming Languages 0 July 21st, 2008 01:05 AM
UPDATE query throws error in selective MSI tables eelisMX General .NET 0 July 14th, 2005 06:29 AM
INSERT query using WiRunSQL.vbs eelisMX VBScript 0 July 13th, 2005 08:14 AM

All times are GMT -4. The time now is 11:54 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.