Part of this may be the way VS setups work, which I don't thinkis deterministic enough. The MSI file is built with an ALLUSERS property value of 2, which means "do an Everyone install if the user is privileged, otherwise fall back to a Just me install". This might be having an effect.
So I think if you are doing the "assign to machine" install (if I remember thatexpression correctly) then SMS will try to do a per-machine Everyone install, but itwill fall back to per-user if you haven't set up the environmentformanaged installs. That's related to the AlwaysInstallElevated setting here:
http://msdn.microsoft.com/en-us/library/aa369784(VS.85).aspxthat a non-administrator can't set, but Group Policy can.
Phil Wilson