Thanks for the help, I tried it without InstallPrivileges="elevated" and it
almost got it to work. Both methods ('Condition' element and type 19 custom
action) appear to have the same net effect.
XP works great and stops the install if not an admin. That fine and is what I
want. Vista however is different. If logged in as admin, double clicking the
msi to launch the install doesn't recognise Im admin & stops with my error
message. Under the same admin login, if I open a command prompt as
administrator and run msiexec /i myinstall.msi , the installer now detects
admin and continues fine. Great! But what sane user is going to want to run an
installer from the command prompt as administrator ;(
Here is my Custom action
<InstallUISequence>
<Custom Action="IsPrivileged" Before="LaunchConditions">Not
AdminUser</Custom>
<Show Dialog="OldVerDetected"
After="FindRelatedProducts">REMOVEOLDPRODUCT</Show>
</InstallUISequence>
Is UISequence the correct place for this stuff? Also note I need to set the
MSIUSEREALADMINDETECTION property to 1 for this to work.
After trying all this it seems (in this case) msi cannot detect if I am an
admin user in Vista. What about creating a bootsrap setup.exe which runs my
installer using msiexec like I did the command prompt. Is that whats normally
done to get round this type of problem?
Lastly I noticed when using:
<Condition Message="You must be an admin to install this product.">Not
AdminUser</Condition>
No Launch Condition Table is created when I open the msi in Orca, even though
the condition seems to work (at least for XP and vista standard user). Why is
that?
_________________________________________________________________
With Windows Live, you can organise, edit, and share your photos.
http://clk.atdmt.com/UKM/go/134665338/direct/01/
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users