Paraleptropy
asked on
Wise Package Studio Custom Action vbscript XML
Hi,
I'd like to create a custom action which reads an external .XML file. Let's say I have 100 registry keys and want to populate them upon uninstall. I want these keys outside of my MSI because I'd like to be able to update them without having to recompile the .MSI. Has anyone worked with something like this before?
Thanks
I'd like to create a custom action which reads an external .XML file. Let's say I have 100 registry keys and want to populate them upon uninstall. I want these keys outside of my MSI because I'd like to be able to update them without having to recompile the .MSI. Has anyone worked with something like this before?
Thanks
ASKER
I'm looking for something more dynamic. I have another way of doing this already. I'm reading values using Winbatch out of a .ini file. I'm exploring new ways of regionalization and someone mentioned the .XML format. Figured I'd give it a shot.
The problem with this code is that it's not regionalized. When I say regionalized I mean that people in NY will get one set of keys, people in LA will get another set, people in Singapore will get another set, etc... Of course I'd like for this to maybe populate more than just the registry, maybe other system settings as well.
Looking forward to ideas and input.
Thank You!
<?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>
The problem with this code is that it's not regionalized. When I say regionalized I mean that people in NY will get one set of keys, people in LA will get another set, people in Singapore will get another set, etc... Of course I'd like for this to maybe populate more than just the registry, maybe other system settings as well.
Looking forward to ideas and input.
Thank You!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Daz,
Thanks for the insight. This is kind of what I was looking for. I like winbatch because it's easy for me to understand.
Thanks!
Thanks for the insight. This is kind of what I was looking for. I like winbatch because it's easy for me to understand.
Thanks!
Thanks for the grade! The only other thing I would add is that you should make your custom routine's actions very transparent via logging, either to a log file or to the application event log. If you don't log well, you'll make troubleshooting problems a nightmare!
Good luck,
Daz.
Good luck,
Daz.
Also if the external file just contains details of the registry entries to write, does it need to be in XML format? Could it not be in standard .reg format?
Regards,
Daz.