Reputation: 41
I'm using a wix installer which should be able to detect a specific windows user account during the installation. So when I try to install and if the user does not exist in that machine means it should not proceed further. Is it possible in wix?
Upvotes: 0
Views: 925
Reputation: 6647
If you need to make sure that user exists, you could just use the util:User element to create the user as part of the install:
<util:User Id="UserToCheckOrCreate"
Name="User123"
Password="Pa55w0rd"
CreateUser="yes"
UpdateIfExists="yes"
PasswordNeverExpires="yes"
PasswordExpired="no"
RemoveOnUninstall="yes" />
Upvotes: 1
Reputation: 17941
You'll have to create a custom action which to checks for the user, if found set a property
. Make this custom action run before LaunchConditions
e.g. <Custom Action="Your_CA" Before="LaunchConditions" />
and in the Launch Conditions check for that property.
Upvotes: 2