cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
iwesley
Level 4

Read from file to modify installer at runtime - Basic MSI

Hi,

I'm working on a Basic MSI application and need general guidance. My installer has optional features, and I need to toggle components and create random shortcuts at runtime. The shortcuts do not exist at build time

For example, let us say that I have foo.exe and bar.exe as files in my features. I want to read from a/an .ini or .xml file runtime.

MyCool.ini
[settings]
bar=0

[items]
water1=Pacific
other1=foo.exe pacific.txt
water2=Indian
other2=foo.exe indian.txt
Water3=Gulf
other3=foo.exe gulf.txt

After the installer has run, I will to modify the installlevel for the feature assocaited with bar.exe and I want to see three shortcuts - Pacific, Indian and Gulf.

What is the best strategy to do this? I am not sure if antivirus programs will be a problem for vb script. Can I create shortcuts on the fly like this? The automation stuff that I have read mostly pertains to changes at build time ...

Thanks for any guidance ... Again, this is basic msi, not installscript ...

i :confused:
Labels (1)
0 Kudos
(2) Replies
iwesley
Level 4

I see that I need to add records to the shortcut table. Any guidance is still welcome ...
0 Kudos
iwesley
Level 4

Hi Folks,

I never got a reply, but I've found that you should avoid VB Script. What works is using managed assemblies. For us old timers, 'Managed Assembly' is secret code for .NET DLL made from a class.

In VB .NET or C#,
1. Make a 'class' file project
2. Add public Function(s)
3. Compile the class and it is a .DLL
4. Use the Custom Actin wizard to add it to your project

Public Function TestDialog()
MsgBox("Test Dialog!")
Return "1"
End Function

Surf the web, and you will find examples. That's it ...
0 Kudos