Discussion:
using wirunsql.vbs
(too old to reply)
Peter Carlson
2005-01-14 21:41:40 UTC
Permalink
I am trying to add a couple of post build steps to our setup project. I use
the following commands:

# default to all users
cscript WiRunSQL.vbs "Setup.msi" "update `Property` set `Value`='ALL' where
`Property`='FolderForm_AllUsers'"

# disable disk cost button
cscript WiRunSQL.vbs "Setup.msi" "update `Control` set `Attributes`=0 where
`Dialog_`='FolderForm' and `Control`='DiskCostButton'"

#add the install and uninstall custom action into the sequence
cscript WiRunSQL.vbs "Setup.msi" "insert into `InstallExecuteSequence`
(`Action`,`Condition`,`Sequence`) values ('Launch_Client_First', 'NOT
Installed', 7500)"
cscript WiRunSQL.vbs "Setup.msi" "insert into `InstallExecuteSequence`
(`Action`,`Condition`,`Sequence`) values ('Launch_Client_LAst', 'Installed',
1850)"

However I am getting fits with adding the custom action itself...I'd like to
do
cscript WiRunSQL.vbs "Setup.msi" "insert into `CustomAction` (`Action`,
`Type`, `Target`, `Source`) values ('Launch_Client_First', 210,
'install=first', (select `File` from `File` where
`FileName`='CHATCL~1.EXE|chatclient.exe'))"

There are 2 problems:
1 the sub select doesn't seem to work...how can I dynamically get the `File`
from the table?
2 I'd like to use a "like" clause instead of = - where `FileName` like
'%client%' instead

Any ideas?
Peter
Carolyn Napier [MSFT]
2005-01-15 03:39:37 UTC
Permalink
Windows Installer only supports a subset of SQL. It does not have support for
the sub select style query nor does it have support for "like". You can use
WHERE clauses to find data that matches some criteria.

For more information on what SQL syntax is supported, consult the following MSDN
topic:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/sql_syntax.asp.

- Carolyn Napier
Microsoft Windows Installer Team
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Please do not send email directly to this alias. This alias is for newsgroup
purposes only.

MSI FAQ:
<http://www.microsoft.com/windows2000/community/centers/management/msi_faq.mspx>
Post by Peter Carlson
I am trying to add a couple of post build steps to our setup project. I use
# default to all users
cscript WiRunSQL.vbs "Setup.msi" "update `Property` set `Value`='ALL' where
`Property`='FolderForm_AllUsers'"
# disable disk cost button
cscript WiRunSQL.vbs "Setup.msi" "update `Control` set `Attributes`=0 where
`Dialog_`='FolderForm' and `Control`='DiskCostButton'"
#add the install and uninstall custom action into the sequence
cscript WiRunSQL.vbs "Setup.msi" "insert into `InstallExecuteSequence`
(`Action`,`Condition`,`Sequence`) values ('Launch_Client_First', 'NOT
Installed', 7500)"
cscript WiRunSQL.vbs "Setup.msi" "insert into `InstallExecuteSequence`
(`Action`,`Condition`,`Sequence`) values ('Launch_Client_LAst', 'Installed',
1850)"
However I am getting fits with adding the custom action itself...I'd like to
do
cscript WiRunSQL.vbs "Setup.msi" "insert into `CustomAction` (`Action`,
`Type`, `Target`, `Source`) values ('Launch_Client_First', 210,
'install=first', (select `File` from `File` where
`FileName`='CHATCL~1.EXE|chatclient.exe'))"
1 the sub select doesn't seem to work...how can I dynamically get the `File`
from the table?
2 I'd like to use a "like" clause instead of = - where `FileName` like
'%client%' instead
Any ideas?
Peter
d***@labyrinth.net.au
2005-01-17 21:25:00 UTC
Permalink
My free MAKEMSI tool is another option which can make it easier to make
changes like this.
As script code can be imbedded it can also make decisions.
Bye,
Dennis Bareis
d***@labyrinth.net.au
2005-01-17 21:28:05 UTC
Permalink
Hi,
Post by Peter Carlson
1 the sub select doesn't seem to work...how can I dynamically get the `File`
from the table?
2 I'd like to use a "like" clause instead of = - where `FileName` like
'%client%' instead
Any ideas?
My free MAKEMSI tool is another option which can make it easier to make
changes like this.
As script code can be imbedded it can also make decisions.
Bye,
Dennis Bareis
d***@labyrinth.net.au
2005-01-17 22:07:48 UTC
Permalink
My free MAKEMSI tool is another option which can make it easier to make
changes like this.
As script code can be imbedded it can also make decisions.
Bye,
Dennis Bareis

Loading...