Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 13th, 2005, 08:20 AM
Authorized User
 
Join Date: Dec 2004
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)

Hi

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:
Code:
Cscript WiRunSQL.vbs Setup.msi "INSERT INTO Registry
(Registry.Registry,Registry.Root,Registry.Key,Registry.Name,Registry.Value,Registry.Component_)
VALUES
('R__ConfigFileRegistry','1','Software\[Manufacturer]\[ProductName]\Config','[_C764143EC7AD42D1BE743AC87204C0E0]','C__00FBFDC77D25406F9F3B6C49E297693F')"
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!
 
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

Hi,

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)
view.Execute
Do
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)
viewreg.Execute
database.commit





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





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