/build/static/layout/Breadcrumb_cap_w.png

Running msiexec through elevated permission

Hi,

I am installing an msi by silent installation ie using /qn installation. It fails because UAC is denied. This msi is installed as a part of continuous integration(CC.Net). Is there a way in which I can actually run the msiexec using elevated permissions? /a does not help either.


Thanks,
Reddy

0 Comments   [ + ] Show comments

Answers (12)

Posted by: andemats 12 years ago
2nd Degree Black Belt
0
Not sure what your trying to accomplish or what your MSI is doing or how it looks
If you are using the same MSI each date, only updating it with new files, you'd probably be able to use the same MST for the updated MSI.
Posted by: anonymous_9363 12 years ago
Red Belt
0
Is there a way to load the newly generated msi into Orca, and change a property value through a batch file or something like that. Windows Installer exposes a bunch of methods and properties so you can use any scripting language that can access Windows COM objects. The object name is 'WindowsInstaller.Installer' and it is documented on MSDN.
Posted by: ReddyLoyalty 12 years ago
Yellow Belt
0
The msi gets generated everyday and I am wanting to install the new msi everyday. There is a property whose value is 0 by default and I change it to 1 in the mst. So I want to generate a new mst corresponding to the new msi everyday. Or is it fine if I just use the old mst with the new msi?
Posted by: anonymous_9363 12 years ago
Red Belt
0
It would be much, much simpler to make the property a public property and then specify its value on the command line.
Posted by: ReddyLoyalty 12 years ago
Yellow Belt
0
Thank you for the reply. I am very very new to all this mst stuff.

1. How can I make a property public?
2. How do I know if a property is public or not?
3. How to set value through commandline.

Please bear with me as I am very very new to all this.
Posted by: andemats 12 years ago
2nd Degree Black Belt
0
A public property is all UPPERCASE.
Look in the property table of your MSI to find it.

MsiExec.exe \\Server\Share\MsiName.msi ALLUSERS=1 /qb!

In the above, "ALLUSERS" is a public property

Edit: I'll leave it to Ian to post the inevitable. [:D]
Posted by: ReddyLoyalty 12 years ago
Yellow Belt
0
thank you very much
Posted by: AngelD 12 years ago
Red Belt
0
A vbscript to create a transform based on two MSIs would look like

'// MsiPath; path to the original MSI
'// MsiTransPath; path to the updated MSI
'// MstPath; path to the transform
Call CreateTransform(MsiPath, MsiTransPath, MstPath)

Function CreateTransform(ByVal MsiPath, ByVal MsiTransPath, ByRef MstPath)
Const msiOpenDatabaseModeReadOnly = 0
Const msiOpenDatabaseModeDirect = 2
Const msiTransformErrorNone = 0
Const msiTransformValidationNone = 0

Dim Installer : Set Installer = CreateObject("WindowsInstaller.Installer")
Dim Database : Set Database = Installer.OpenDatabase(MsiPath, msiOpenDatabaseModeReadOnly)
Dim TransDatabase : Set TransDatabase = Installer.OpenDatabase(MsiTransPath, msiOpenDatabaseModeDirect)

TransDatabase.GenerateTransform Database, MstPath
TransDatabase.CreateTransformSummaryInfo Database, MstPath, msiTransformErrorNone, msiTransformValidationNone
TransDatabase.Commit
End Function
Posted by: pjgeutjens 12 years ago
Red Belt
0
I might be off the mark here, but if your base MSI remains roughly structurally the same, and the only change in the MST would be to set a property from 0 to 1, you can just re-use the same MST on your MSI every time.
That being said, the idea of using a public property would make your life alot easier in this case.

PJ
Posted by: AngelD 12 years ago
Red Belt
0
Have in mind that public properties does not get "stuck" so it will not be available through a repair, so that is something you'll need to handle (write/read to registry).
Posted by: ReddyLoyalty 12 years ago
Yellow Belt
0
I am successful in running using /qb but when I use /qn, the installation fails. This is because when I use /qn option, I do not answer the UAC, so it fails. Is there a way that I can actually run the msi as an administrator woth elevated permissions. I used /a but that does not help either.
Posted by: jmaclaurin 12 years ago
Third Degree Blue Belt
0
/a is to create an administrative install point so it won't help you.

I don't know anything about CC.net so I'm sorry if this doesn't help you. If it is a deployment tool like SMS, LANDesk, SCCm, etc, then it likely has a setting to run as an administrator account or System. Be sure you have that set properly.

MSI's can't use Run as Admin (from the right click menu), but in general it will prompt for UAC. So instead you have 2 choices (well, more but here is probably the easiest 2). When you create your msi package, create it inside or with a setup.exe or put your msiexec.exe command inside a cmd or bat file.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ