Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > msiexec.exe command line install does not select default option
 

msiexec.exe command line install does not select default option

Hi, I am trying to do a silent install with the following command line:

msiexec.exe /i <My installer.msi>/qn

There are two install options for my installer, one is a complete install, one is installing without an optional component. Complete install is the default option.

However, when I run the above command line, the installing without the optional component (ie/ not the default option) gets selected.

Is there any way I can correct this? Many thanks for your help.

I am running on XP 2003 SP3.
  • Moved byWesley YaoMSFTTuesday, July 07, 2009 8:47 AMdeployment question (From:MSBuild)
  •  
ohanna  Sunday, July 05, 2009 9:28 PM
Thanks a lot for your responses!

Actually I just managed to figure out the solution. I needed to include the INSTALLLEVEL on my command line.

http://msdn.microsoft.com/en-us/library/aa367988%28VS.85%29.aspx

Cheers.
  • Marked As Answer byohanna Tuesday, July 14, 2009 3:44 PM
  •  
ohanna  Thursday, July 09, 2009 3:40 PM

Hi ohanna,

Could you please tell me how you implemented the install options? I created a Setup Project which has install options but it works fine: the default option is installed. Theseare my steps to add an install option:

1. In the User Interface view, add a RadioButtons(2 buttons) dialog between the Welcome dialog and the Installation Folder dialog.

2. Modify the properties of the dialog related to display, such as BannerText, BodyText, Button1Label and Button2Label.

3. Set other properties. Button1Value : 1; Button2Value : 2; ButtonProperty : INSTALLCOMPONENT; DefaultValue : 1.

4. In the File System view, add an extra component and set its Condition property to INSTALLCOMPONENT=1.

After the command was executed, the option related to button 1 is installed.


Let me know if this helps.
Aland Li


Please mark the replies as answers if they help and unmark if they don't. This can be beneficial to other community members reading the thread.
Aland Li  Wednesday, July 08, 2009 5:28 AM
See if you can do this the other way round by having the install default to installing that component (and having the checkbox checked by default). The logical problem is that the default doesn't install that component, whether you show UI or not, so it's being consistent. If the default is that you DO install it and the checkbox needs unchecking to skip the install it should work. I hope I explained that reasonavbly clearly.
Phil Wilson
PhilWilson  Wednesday, July 08, 2009 8:52 PM
Hi ohanna,

Do you mean that the component is a prerequisite?

Aland Li
Please mark the replies as answers if they help and unmark if they don't. This can be beneficial to other community members reading the thread.
Aland Li  Thursday, July 09, 2009 2:56 AM
Thanks a lot for your responses!

Actually I just managed to figure out the solution. I needed to include the INSTALLLEVEL on my command line.

http://msdn.microsoft.com/en-us/library/aa367988%28VS.85%29.aspx

Cheers.
  • Marked As Answer byohanna Tuesday, July 14, 2009 3:44 PM
  •  
ohanna  Thursday, July 09, 2009 3:40 PM

Hi ohanna,

Did you make progress in your issue? It is appreciated if you can share your researching results. Thanks.

Best regards,
Aland Li


Please mark the replies as answers if they help and unmark if they don't. This can be beneficial to other community members reading the thread.
Aland Li  Tuesday, July 14, 2009 2:14 AM
Hi Aland. I resolved my problem by including the INSTALLLEVEL on my command line (orwere you referring to something else?) Please refer to my post above. Thanks.
ohanna  Tuesday, July 14, 2009 3:43 PM

Hi ohanna,

Thanks very muchfor sharing your answer.

Best regards,
Aland Li


Please mark the replies as answers if they help and unmark if they don't. This can be beneficial to other community members reading the thread.
Aland Li  Tuesday, July 14, 2009 3:53 PM

You can use google to search for other answers

Custom Search

More Threads

• text box with password mask
• deploy smart client that uses caching app block
• An error occurred trying to download '<MyURLApp>.application'
• Launch condition to uninstall previous version of Word Add-In
• How to check the .net framework as launch condition (if .net have been removed)
• MSI: Condition expression on Folder not working?
• How to display message "There is PRODUCT x.xx already installed"
• Non-English Installation Dialogue box
• ClickOnce and expired Certificates
• Installler Issue?