Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Obtaining command line of msiexec


3 replies to this topic

Eugene82

Eugene82
  • Full Members
  • 6 posts

Posted 27 October 2010 - 07:45

Hi all!
I need to get command line of msiexec from custom action.
Is it possible legally?
Or do you know some workaround for solve this task?

Thanks for replies.


VBScab

VBScab
  • Full Members
  • 436 posts

Posted 27 October 2010 - 08:47

What is it you actually want, the command line passed to MSIExec or the command line used by a Custom Action in the MSI?

For the former, I presume you have an EXE which extracts and executes an MSI. If that's the case, you can normally pass arguments to the EXE to get it to generate a Windows Installer log.

For the latter, you'll be limited to what the MSI itself shows you. Some functions will build their own command lines internally, in which case you'll need to ask the vendor for details.
- Don't know why 'x' happened? Want to know why 'y' happened? ProcMon will tell you.
- Try using http://www.google.com before posting.
- I answer questions only via forums. Please appreciate the time I give here and don't send me personal emails.

Eugene82

Eugene82
  • Full Members
  • 6 posts

Posted 27 October 2010 - 09:46

thanks for attention!

my custom action should no to have knowledge about any bootstrapper.
and i need to get command line that was used for launch current msiexec.

in log file exists:
MSI © (2C:C8) [16:05:53:341]: Command Line:
REINSTALL=ALL REINSTALLMODE=voums CURRENTDIRECTORY=C:\Documents and Settings\Administrator\Desktop\Server CLIENTUILEVEL=0 CLIENTPROCESSID=1068

and i need string -
REINSTALL=ALL REINSTALLMODE=voums CURRENTDIRECTORY=C:\Documents and Settings\Administrator\Desktop\Server CLIENTUILEVEL=0 CLIENTPROCESSID=1068

VBScab

VBScab
  • Full Members
  • 436 posts

Posted 27 October 2010 - 17:08

Eh?

If there's no bootstrapper, then YOU will have passed the command line!

I suspect what you actually need are the values for the properties REINSTALL and REINSTALLMODE (the others are populated dynamically as the MSI is read).

If so, you can simply use the properties themselves, using the Session object's Property method. An example in VBS would look like this:
CODE
strReinstallMode = Session.Property("REINSTALLMODE")

- Don't know why 'x' happened? Want to know why 'y' happened? ProcMon will tell you.
- Try using http://www.google.com before posting.
- I answer questions only via forums. Please appreciate the time I give here and don't send me personal emails.