VBscript XML Custom Action
I posted a thread a few weeks ago and now looking at a suggestion from Jmcfadyen I have been trying to get something going here. Maybe someone can help me out.
As suggested by Jmcfadyen, I check out Wix. Wix is good but I don't think it's good for what I'm doing. Wix more or less creates a .MSI for you based on a supplied .XML file. It's nice but I think I'll stick with Wise for this.
I have a bit of code such as this for example:
This code would reside as a .XML file located in the same directory as the .msi / transform. I'd like to have a custom action read these values and populate the registry keys. Keep in mind, the above was target specifically for Wix.
This line:
<RegistryValue Id="registry594" Root="HKLM" Key="SOFTWARE\ODBC\ODBC.INI\BOB" Name="LastUser" Value="SYSTEM" Type="string"/>
Could probably be narrowed down to something such as:
<Root="HKLM" Key="SOFTWARE\ODBC\ODBC.INI\BOB" Name="LastUser" Value="SYSTEM" Type="string"/>
So how do I get this going? I know there has to be a way, I just can't seem to find it. :(
As suggested by Jmcfadyen, I check out Wix. Wix is good but I don't think it's good for what I'm doing. Wix more or less creates a .MSI for you based on a supplied .XML file. It's nice but I think I'll stick with Wise for this.
I have a bit of code such as this for example:
<?xml version='1.0'?>
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
<Product Id='{929E7AB8-2E59-4C9B-B15A-C89D1E7BFC47}' Name='My package.msi' Language='1033'
Version='38.8.5.1' Manufacturer='Microsoft Corporation' UpgradeCode="{5381834C-1044-47B0-A6D7-B93B5974B2F4}">
<Package Description='My Package'
Comments='TEST INSTALL'
Manufacturer='Microsoft Corporation' InstallerVersion='200' Compressed='yes' />
<Feature Id='Features' Title='Features' Level='1'>
<ComponentRef Id='Registry' />
</Feature>
<Directory Id='TARGETDIR' Name='SourceDir'>
<Component Id="Registry" Guid="{387A0463-20A4-4FEB-8070-A00C43C304E2}">
<RegistryValue Id="registry506" Root="HKLM" Key="SOFTWARE\PRC\Chinese_Food" Name="General Tsao" Value="Combo" Type="string"/>
<RegistryValue Id="registry589" Root="HKLM" Key="SOFTWARE\ODBC\ODBC.INI\BOB" Name="Driver" Value="[SystemFolder]SQLSRV32.dll" Type="string"/>
<RegistryValue Id="registry590" Root="HKLM" Key="SOFTWARE\ODBC\ODBC.INI\BOB" Name="Description" Value="Restarea1" Type="string"/>
<RegistryValue Id="registry591" Root="HKLM" Key="SOFTWARE\ODBC\ODBC.INI\BOB" Name="Server" Value="Restaraunt" Type="string"/>
<RegistryValue Id="registry592" Root="HKLM" Key="SOFTWARE\ODBC\ODBC.INI\BOB" Name="Database" Value="buffet" Type="string"/>
<RegistryValue Id="registry593" Root="HKLM" Key="SOFTWARE\ODBC\ODBC.INI\BOB" Name="Language" Value="us_english" Type="string"/>
<RegistryValue Id="registry594" Root="HKLM" Key="SOFTWARE\ODBC\ODBC.INI\BOB" Name="LastUser" Value="SYSTEM" Type="string"/>
</Component>
</Directory>
</Product>
</Wix>
This code would reside as a .XML file located in the same directory as the .msi / transform. I'd like to have a custom action read these values and populate the registry keys. Keep in mind, the above was target specifically for Wix.
This line:
<RegistryValue Id="registry594" Root="HKLM" Key="SOFTWARE\ODBC\ODBC.INI\BOB" Name="LastUser" Value="SYSTEM" Type="string"/>
Could probably be narrowed down to something such as:
<Root="HKLM" Key="SOFTWARE\ODBC\ODBC.INI\BOB" Name="LastUser" Value="SYSTEM" Type="string"/>
So how do I get this going? I know there has to be a way, I just can't seem to find it. :(
0 Comments
[ + ] Show comments
Answers (4)
Please log in to answer
Posted by:
anonymous_9363
13 years ago
First, Jon has an XML class posted somewhere for reading and writing XML elements and attributes.
Second, there is a dedicated 'Scripting' forum on AppDeploy. A moderator may well move this thread there.
Second, there is a dedicated 'Scripting' forum on AppDeploy. A moderator may well move this thread there.
Posted by:
Secondlaw
13 years ago
ORIGINAL: VBScabAhhh but where?
First, Jon has an XML class posted somewhere for reading and writing XML elements and attributes.
Second, there is a dedicated 'Scripting' forum on AppDeploy. A moderator may well move this thread there.
Moderator, please move to scripting. I apologize for this.
Posted by:
anonymous_9363
13 years ago
It's been a while so thanks http://www.lmgtfy.com/?q=mcfadyen+xml+class
Posted by:
jmcfadyen
13 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.