How do I edit an MSI file to include the additional msiexec parameters

Posted on 2009-05-19
Medium Priority
Last Modified: 2012-05-07
hi guys, I need to install the NOD4 antivirus software through Group Policy.
I have an MSI file that I can run using msiexec where I can specify additional parameters such as "/qn"
I need to know how to add these additional parameters such as "/qn" into the MSI file itself so that when I run the MSI installer I do not need to specify these additional parameters (they are already built into the MSI)
I understand there are a number of different packages out there that allow you to open and modify an MSI file.
I have such program.
I have opened the MSI file and I can see all the details of it but I am unsure where exactly I am supposed to specifiy these additional parameters.
There is a "custom action" section...etc that allows me to add adtional custom actions but i don't even fully understand how to do that.
For example...one of the custom actions I could run is to "add a VBSCRIPT"...I have created a VBscrip that runs my MSI with these additional actions specified....but this will not work because at the time when vbscript runs...it is supposed to call the MSI and start installing. however it can not do this as my current MSI is already running!!!!

I hope all this makes some sense!!! thanks heaps in advance!!!!

PS Yes..... I need to do deploy this software through group policy and it is a requirement.....please don't suggest SMS and other stuff as I need to use Group policy (which does not allow me to specify additional parameters)
Question by:DigitalServices
  • 7
  • 4

Expert Comment

ID: 24428808
http://www.advancedinstaller.com/ should do the trick.

Author Comment

ID: 24435694
I will try it in about an hour (on my way to work now) and will report back.
Thanks for the suggestion.

Author Comment

ID: 24436256
hi Again,

I have downloaded the program you suggested and have run it....it does pretty much the same thing as the one that I already have installd on my PC.
I can open and modify an MSI, I can even create a new installation....however...i do not know hot to specify startup paremeters.
Can you ploese give me step by step instructions on either:

How to modify an existing MSI to include additional parameters, for example a "/qn"
How to package a VBscript into an MSI.(I already have a vbscript that can call my MSI with all the necessary parameters.If I can package this vbscript as an MSI this would solve my problms...ie when a user double clicks on this newly created MSi, the vbscript inside it gets executed).
Making Bulk Changes to Active Directory

Watch this video to see how easy it is to make mass changes to Active Directory from an external text file without using complicated scripts.


Author Comment

ID: 24436307
Also, I tried adding just my vbscipt into this MSI I am creating.
I now run this MSI and I can see the folder being created under program files, with my vbscript inside it, but the vbscript did not run.
I need it to run in order to install wht I need.
What actions do i need to take to make this script run?

Expert Comment

ID: 24461876
Check if the package's author allows the use of a 'transform' file. Then you can use 'Orca' to create a transform that adds the required properties to your software installation GPO. Bill.

Author Comment

ID: 24464283
I know that I need to create a transform file....i don't need to use ORCA...i can use any program that will allow me to modify an MSI to create a transform!!!

What i don't know......is once I have opened the MSI file for editing....where do I specify these additional required parameters?

Once I know where to enter them i can just save the changes and it will create a transform file for me.

Once again....I don't know where to specify these additional parameters!!! is in somewhener under the custom actions?

Expert Comment

ID: 24466894
Hi DigitalServices, most likely, the changes you require exist in the 'Property' table. The MSI's author should be able to provide more details about which properties you will need to use.

Another alternative: Many anti-virus software vendors provide their own delivery and updating mechanism, complete with management console, etc. I don't know if your software provides that or not, but I would look into that possibility as well. Bill.

Author Comment

ID: 24468850
Hi Bill,

when I run msiexec this is the list that I get:
Windows ® Installer. V 4.5.6001.22162

msiexec /Option <Required Parameter> [Optional Parameter]

Install Options
      </package | /i> <Product.msi>
            Installs or configures a product
      /a <Product.msi>
            Administrative install - Installs a product on the network
      /j<u|m> <Product.msi> [/t <Transform List>] [/g <Language ID>]
            Advertises a product - m to all users, u to current user
      </uninstall | /x> <Product.msi | ProductCode>
            Uninstalls the product
Display Options
            Quiet mode, no user interaction
            Unattended mode - progress bar only
            Sets user interface level
            n - No UI
            b - Basic UI
            r - Reduced UI
            f - Full UI (default)
            Help information
Restart Options
            Do not restart after the installation is complete
            Prompts the user for restart if necessary
            Always restart the computer after installation
Logging Options
      /l[i|w|e|a|r|u|c|m|o|p|v|x|+|!|*] <LogFile>
            i - Status messages
            w - Nonfatal warnings
            e - All error messages
            a - Start up of actions
            r - Action-specific records
            u - User requests
            c - Initial UI parameters
            m - Out-of-memory or fatal exit information
            o - Out-of-disk-space messages
            p - Terminal properties
            v - Verbose output
            x - Extra debugging information
            + - Append to existing log file
            ! - Flush each line to the log
            * - Log all information, except for v and x options
      /log <LogFile>
            Equivalent of /l* <LogFile>
Update Options
      /update <Update1.msp>[;Update2.msp]
            Applies update(s)
      /uninstall <PatchCodeGuid>[;Update2.msp] /package <Product.msi | ProductCode>
            Remove update(s) for a product
Repair Options
      /f[p|e|c|m|s|o|d|a|u|v] <Product.msi | ProductCode>
            Repairs a product
            p - only if file is missing
            o - if file is missing or an older version is installed (default)
            e - if file is missing or an equal or older version is installed
            d - if file is missing or a different version is installed
            c - if file is missing or checksum does not match the calculated value
            a - forces all files to be reinstalled
            u - all required user-specific registry entries (default)
            m - all required computer-specific registry entries (default)
            s - all existing shortcuts (default)
            v - runs from source and recaches local package
Setting Public Properties

Consult the Windows ® Installer SDK for additional documentation on the
command line syntax.

Copyright © Microsoft Corporation. All rights reserved.
Portions of this software are based in part on the work of the Independent JPEG Group.

The above switches are not vendor specific but are general switches that most MSIs will understand.
If I want to run some of these switches I have no place to specify them if deploying the MSI through group policy.
This is why I wanted to include some of these switches into the MSI file itself and I am still stuck as to where exactly do I do this once I  have the MSI open.
Our antivirus software does have its ovn management console that we can use to push it to PCs however my boss wants this done through group policy as he wants every pc in our domain to have this , even as the new one's are added.

Do you know exactly where in the msi (once you have opened it) am I supposed to add these switches?
You mentioned it is somewhere under properties?

Expert Comment

ID: 24469185
Hi DigitalServices, a GPO software installation policy will automatically install software in hands-free mode (like the '/qb' option). Just add the MSI file to the GPO as an 'assigned' application, reboot the machines in the OU affected by the GPO, and the software will install itself automatically. You will only need a transform file if the default MSI installation properties (usually a 'typical' install) are insufficient. Bill.

Author Comment

ID: 24469921
Hi Bill,

I know that it will install silently without the need for the switch.
I was just using /qn as an example...in order to figure out where in the MSI am I supposed to eneter these parameters.
If you want the exact parameter that I want to use it is the ADMINCFG="location" switch.

What I need to know is where in the MSI do I enter these additional installation parameters.


Accepted Solution

AbqBill earned 1500 total points
ID: 24473949
Hi DigitalServices, an uppercase STRING=setting for an MSI installer is how you set a public property. What you need is a transform file that sets the ADMINCFG property in the 'Property' table to your desired location, and then apply this transform to your software installation policy when you create it. Make sure you don't include the double-quotes when adding the property in your transform file (they are only needed when setting the property at the command line). Bill.

Author Comment

ID: 24523366
Hi Bill, my aplogies for the late reply...I was away for a couple of days.
I will try what you suggest.
I will accept your answer as the valid answer as you are the only person trying to help and no one else seems to know much about it.
Thanks for all your time.

Featured Post

Making Bulk Changes to Active Directory

Watch this video to see how easy it is to make mass changes to Active Directory from an external text file without using complicated scripts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After seeing many questions for JRNL_WRAP_ERROR for replication failure, I thought it would be useful to write this article.
Wouldn't it be nice if objects in Active Directory automatically moved into the correct Organizational Units? This is what AutoAD aims to do and as a plus, it automatically creates Sites, Subnets, and Organizational Units.
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

621 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question