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

Reading Command Line Paramaters


3 replies to this topic

dcleous

dcleous
  • Members
  • 38 posts

Posted 26 April 2004 - 16:05

Hello:
How would I get the command line parameter (e.g /L*v) for Log level selected by user during the install.
say:
msiexec /i abc.msi /L*v abcd.log.

I need the paramater followed by the /L like to decide whether it is informational or verbose..or any of (voicewarmup).
Thanks.
Leo

luke_s

luke_s
  • Full Members
  • 532 posts

Posted 28 April 2004 - 03:50

I dont think that there is any easy way to grab this information.

You might be able to write a custom action that will grab the current process (msiexec) and find the parameters that were passed to it.

Alternatively, you could create your own setup.exe, or use the one in the msi sdk, scan the command line argument.

MsiGetMode will enable you too see if logging is currently enabled.

Why do you need to check this?

dcleous

dcleous
  • Members
  • 38 posts

Posted 28 April 2004 - 15:24

I'm writing to Log file and I want certain messages to be displayed at certain level.

luke_s

luke_s
  • Full Members
  • 532 posts

Posted 28 April 2004 - 23:48

Hmmm this could be quite complicated...

Windows Installer does allows error logging and user logging, but to diversify even more, you will need access the parameters that were passed in. There will also, some added complexity if the user has set msi logging inside windows. You would need to grab this value somehow as well.

Currently in my project, I just log information messages all of the time, and error messages when an error occurs and I abort the install.

Does anyone else have any ideas?