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

Silent Installation - Basic MSI project

Hello Everyone...I am trying to make a silent installation for Basic MSI project . I found out that Silent installation executes custom action present in "Execute sequence" . So I included custom actions related to proj in "Execute sequence" in correct order of execution . To run silent install I ran these commands

setup.exe /s /v"/qn" also tried msiexec /i Product.msi /qn

installation doesnot take place at all....

If anyone knows how to run silent installation for Basic MSI project . Plz let me know.
Labels (1)
0 Kudos
(24) Replies
dan_galender
Level 10

Have you tried logging the installation and seeing what the log says?

You might try either

setup.exe /s /v"/qn /l*v c:\msilog.txt"

or

msiexec /i Product.msi /qn /l*v c:\msilog.txt

both will generate the file c:\msilog.txt.
0 Kudos
legolas85
Level 4

Thanks DanGalender for your early reply . I tried the logging mechanism . Almost all of my properties are getting set. But last line in log says
MainEngineThread is returning 1603

After that RemoteAPI object is destroyed and Custom Action Manager thread ending...These errors are because of some custom action in Execute sequence??? UI installation works perfectly.
0 Kudos
legolas85
Level 4

One more doubt...I am reading values from an xml file that is included under support files/Disk1....In UI installation I use this file to fill in values for text fields....that is I am setting "Property"(assosciated with text fields and check boxes) to value present in xml file .
During silent install these "Properties" are not set to values present in xml . Plz help if anyone got any clue to this. How to set "Property" to some value in silent install of Basic MSI project.
0 Kudos
dan_galender
Level 10

When you run silently, the UI sequence is skipped and only the Execute sequence is run.

You'll want to include the action that reads the values from the XML file in your Execute sequence as well (you can set the Execution Scheduling to "Execute only once" so that if the user runs with the UI sequence the action is *not* rerun in the Execute sequence. Since it works when you run with the UI, I'm guessing that you store those values in public properties (or their values would not be set in the Execute Sequence properly).
0 Kudos
legolas85
Level 4

Thanks again . I had done those before itself . Log file obtained from method above can be used to view if "Property" is set right....any other way 2 view "Property" value after silent install...
0 Kudos
dan_galender
Level 10

I'm sorry, I don't understand your post. Is there a question there or are you ok now?
0 Kudos
legolas85
Level 4

My question is how to view the value of "Property" after silent installation....
0 Kudos
dan_galender
Level 10

As you say, the MSI log can show the values of properties as they chnage and a "dump" of the values of all properties towards the end.
0 Kudos
legolas85
Level 4

Thanks again. I have one more question to you . Can you explain the steps involved in converting an Basic MSI UI installation into a silent installer. I am still not very clear about the sequence of actions under the Execute Tab. Thanks in advance.
0 Kudos
dan_galender
Level 10

There are no steps to follow, there is no conversion.

A "standard" installation runs both the User Interface sequence and the Execute sequence, but a silent installation only runs the Execute sequence. Now, understanding the actions is a whole separate topic and unfortunately too involved to go into in a forum like this. You might consider reading about actions and sequences in the MSI online documentation.

Good luck.
0 Kudos
legolas85
Level 4

Thanks I think I will need it . One last question . Do I have to include actions used for "standard installation" under "Execute" sequence for silent installation. Thanks in advance.
0 Kudos
dan_galender
Level 10

If I understand you correctly, no. Those actions are there in the default Execute sequence.
0 Kudos
legolas85
Level 4

Ok .Let me just rephrase my question with an example . I have created a custom action called "Test" . Test is a VB script custom action . Action reads data from XML and sets a "Property" says USER_NAME to some value . I have included this under UI for standard installation .
I want the same action(i.e reading value from XML and setting Property USER_NAME) to be executed in silent install also . So for silent install do I have to include the same (using the insert functionality for "execute") in "Execute" Sequence???? Hope I am very clear this time.
0 Kudos
dan_galender
Level 10

Yes you were (clear) and yes you do (need to include that action in the Execute sequence or it won't get executed in the case of a silent installation).

If you don't need the value of that property set for any other reason in the User Interface sequence (like to display that property in a dialog box), you might not need it in the UI sequence just in the Execute sequence. You might also set the Execution Scheduling to "Execute only once" so that if it executed in the UI sequence, it doesn't have to run again in the Execute sequence, but it it didn't run the UI sequence, it will run in the Execute sequence.

You should also be aware that InstallShield has built-in extensions to the MSI specification to allow for reading values from an XML file in a System Search. Words to live by: The best custom action is the one you don't have to write.
0 Kudos
legolas85
Level 4

Thanks . After silent install I am checking the "Property" value via the log . These values are not getting set .
In VBscript custom action I am setting the value using the following command :
session.Property("Prop_name") = "Prop_val".

Will this work or is there any other method to set property values for silent install????
0 Kudos
dan_galender
Level 10

Are you trying to set the value of a property in a deferred custom action? If so, that can't be done.
0 Kudos
legolas85
Level 4

No i am not setting the value in any deferred custom action . I have a custom action "test" . I have included this in "Execute sequence" for silent installation. This script contains code to set a property value say "USERNAME" . So the code is

session.Property("USERNAME") = "legolas"

Now I am running this silent install . Later checking the value by looking into the logs generated . This "Property" value is not getting set in silent install . But same script executed in "Normal" install sets the value .

So my question was is there a special way to set the property values for silent install other than the one I have specified above .
0 Kudos
dan_galender
Level 10

As long as the action appears in the Execute sequence, it will get executed. What does the log say about that action? Is it begin executed or not?
0 Kudos
legolas85
Level 4

That custom action is not getting executed. After executing few default custom action under "Execute" sequence it stops giving a "Error 2728.Table definition error" . All actions after that are not getting executed . My custom actions are in sequence after this.
0 Kudos
dan_galender
Level 10

At the end of that message doesn't it give the name of the table that is in error?
0 Kudos