PDA

View Full Version : Automation interface



NewsArchive
12-07-2001, 01:00 AM
Hi,

Is it possible to rename component or a feature with Automation interface
(VBscript)?
Is it possible to set component to 64-bit with Automation interface
(VBscript)?

Regards
Erik

NewsArchive
12-07-2001, 01:00 AM
The name field is read only and our end user automation does not expose the
64 Bit attribute.

However you could use the Windows Installer Automation interface to do this
if you wanted to. It would look something like: (this is off the top of my
head, so don't scream when you find syntax errors)


This uses the Installer,Database, View and Record Objects. All of these
objects are fully documented in the windows installer help library. Using
techniques similar to this you can modify ANY part of the InstallShield
Project File.

'''''''''''''''''''''''''''''''''''''''''''
dim pInstaller
set pinstaller = CreateObject("WindowsInstaller.Installer")

dim strISMFile
strISMFile = "C:\MySetups\ChangeMe.ism"


dim pDatabase
set pDatabase = pInstaller.OpenDatabase(strISMFile,1)

dim strSQL
strSQL = "SELECT * FROM Component WHERE `Component`='MyComponentName'"

dim pView
set pView = pDatabase.OpenView(strSQL)
pView.Execute(0)

dim pRecord
set pRecord = pView.Fetch()

pRecord.StringData(1) = "NewComponentName"
pRecord.IntegerData(4) = pRecord.IntegerData(4) And 256

pView.Modify(3,pRecord)

pDatabase.Commit()


''''''''''''''''''''''''''''''''''''

Regards
David Thornley

"Erik Zunec" <erikz@hermes.si> wrote in message
news:3c10cdb5$1@news.installshield.com...
> Hi,
>
> Is it possible to rename component or a feature with Automation interface
> (VBscript)?
> Is it possible to set component to 64-bit with Automation interface
> (VBscript)?
>
> Regards
> Erik
>
>
>
>

NewsArchive
12-07-2001, 01:00 AM
I know the answer to the second question is no, you cannot
set the 64-bit component flag through the automation interface.
I asked this of InstallShield a couple months ago.

Jan

"Erik Zunec" <erikz@hermes.si> wrote in message
news:3c10cdb5$1@news.installshield.com...
> Hi,
>
> Is it possible to rename component or a feature with Automation interface
> (VBscript)?
> Is it possible to set component to 64-bit with Automation interface
> (VBscript)?
>
> Regards
> Erik
>
>
>
>