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
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)
Please log in to answer
Posted by:
andemats
12 years ago
Posted by:
anonymous_9363
12 years ago
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
Posted by:
anonymous_9363
12 years ago
Posted by:
ReddyLoyalty
12 years ago
Posted by:
andemats
12 years ago
Posted by:
AngelD
12 years ago
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
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
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
Posted by:
ReddyLoyalty
12 years ago
Posted by:
jmaclaurin
12 years ago
/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.
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.
so that the conversation will remain readable.