/build/static/layout/Breadcrumb_cap_w.png

[LogonUser] Condition Problem

Hi there

I need to copy a different .exe file dependent on which user installs the application (there are only two users using this app).
So I created two components which install the appropriate .exe file and put a condition on them:
LogonUser = "username"
If I use a Custom Action with that condition, it works fine. However I don't get that components installed properly.

Any other ideas?

Thanks
Roland

0 Comments   [ + ] Show comments

Answers (5)

Posted by: AngelD 17 years ago
Red Belt
0
What is not working properly?

how about using something like:
Const msiInstallStateAbsent = 2
Const msiInstallStateLocal = 3
Session.ComponentRequestState("ComponentName1") = msiInstallStateLocal
Session.ComponentRequestState("ComponentName2") = msiInstallStateAbsent
Posted by: rpfenninger 17 years ago
Second Degree Green Belt
0
What tried to say is:
if I put that condition on a VB-Script Custom action (just for testing purposes, a simple script that shows a dialog box for example) it recognizes the currently logged in user and whether it is the right one shows or doesn't show the dialog box.
However if I put the same condition on a component to install the .exe file, it either doesn't get installed at all or installs the wrong component.

Thanks for your further help.
Posted by: RobinV 17 years ago
Senior Yellow Belt
0
Roland,

How do you fill the property LogonUser? Do you know if it gets a value or can you display the value?
I remember I once had to use a Set Property Custom Action to fill a property before using it with a condition. In this case Property LogonUser with property value [%USERNAME]

Hope this helps

Regards,
Robin
Posted by: AngelD 17 years ago
Red Belt
0
What attribute are set on the components and maybe the feature attributes holding the components?

Tried this myself, just added two files in separate components and added the condition to each of them which worked.
condition is used: LogonUser = "<username>"
Attribute on component was set to msidbFeatureAttributesFavorLocal (0)
Posted by: rpfenninger 17 years ago
Second Degree Green Belt
0
Thank you guys. I solved my problem.
After you guys gave me the idea of showing the content of the LogonUser property on a dialog box, I've noticed, that some user accounts are in upper case and some in lower case [8D]
All I've had to do is to change the condition slightly to
LogonUser~= "username"

Thanks a lot

Roland
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ