문제

I have a setup project that I'm working with and have added a EULA to the User Interface. I need to support both unattended (command line) installation as well as GUI install via running setup. The EULA is enforced in the GUI install but not in the unattended one.

Currently I'm running the command line installation in the following format passing in parameters used in a custom action:

MSIEXEC /i ProjectSetup.msi /qn /l* log.txt Param1="Foo" Param2=Bar

Worst case I suppose I could require an additional parameter "AcceptEULA" and bomb out of the install if it's not found when we're doing a command line installation. Any guidance anyone can provide is greatly appreciated.

도움이 되었습니까?

해결책

Everyone should realize that Param1 Param2 and AcceptEULA cann't be passed to an MSI. Only public properties ( all upper case ) like ACCEPTEULA can be passed.

MSI can easily do this by using a LaunchCondition that keys off of a custom property such as ACCEPTEULA and the built-in property UILevel. The goal is to only allow installation if UILevel=5 or ACCEPTEULA=1 or if the product is (already) Installed

Condition:

UILevel = 5 or ACCEPTEULA or Installed

You must accept the EULA to install [ProductName].

Public Properties: http://msdn.microsoft.com/en-us/library/aa370912(VS.85).aspx

Launch Condition: http://msdn.microsoft.com/en-us/library/aa369752(VS.85).aspx

UILevel: http://msdn.microsoft.com/en-us/library/aa372096(VS.85).aspx

다른 팁

Display the EULA at first run when the GUI is started. Eg. like the various sysinternals tools do it (FileMon, RegMon etc). The good think is that it works with xcopy deployment.

I generally assume that clicking "Accept" isn't any more legally binding than simply using the software. In some jurisdictions, accepting the EULA is what gives the user the right to install/run the software.

Otherwise, I simply tweak the installer so it never presents EULAs, therefore I'm not bound by them.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top