Line after IF statement is displayed for some users
› Forums › Desktop Info › Line after IF statement is displayed for some users
Tagged: IF
- This topic has 19 replies, 2 voices, and was last updated 5 months, 3 weeks ago by
Arvis.
-
AuthorPosts
-
-
19 November, 2021 at 7:45 am #4752
Arvis
ParticipantWe recently updated from v2.x to 3.2.2. Everything displays fine in our testing and it’s working perfectly for most users. However, for some users it is displaying everything after an IF statement, no matter what we do to it.
If=value1:1,value2:0,comparator:lt
COMMENT=text:This text will displayIf=value1:1,value2:0,comparator:gt
COMMENT=text:This text will displayetc
-
19 November, 2021 at 8:14 am #4753
webmaster
KeymasterI can’t reproduce that based on the given config snippet. The second comment displays as expected.
At this point you would be looking to find something that’s different about the situations that work compared to those that don’t.
-
23 November, 2021 at 10:59 am #4776
Arvis
ParticipantI’ve done some more testing. When desktopinfo first loads it will display the lines after the IF statement and nothing else for only a second or less. It then refreshes with the rest of the information and processes the IF statements correctly. However, for some people it doesn’t refresh properly and will only display the incorrect IF statement info. Is there a way to make it display nothing until it loads all information?
-
23 November, 2021 at 11:05 am #4777
webmaster
Keymasterpost your actual ini file so i have something to work with
-
23 November, 2021 at 11:20 am #4778
Arvis
ParticipantAttached.
-
23 November, 2021 at 11:22 am #4779
Arvis
ParticipantAttached again, this time as .txt
-
23 November, 2021 at 11:24 am #4780
Arvis
ParticipantIt’s not allowing me to upload a txt file or post the contents of it in this box. I’ll try to attach screenshots of the errors.
-
23 November, 2021 at 11:44 am #4785
webmaster
Keymasterzip the ini file or paste into the “crayon” tool. see the option in the toolbar just above where you type your message.
-
23 November, 2021 at 11:49 am #4786
Arvis
ParticipantI got the hand page when using the CRAYON as well. Hopefully the zip makes it through.
Attachments:
-
23 November, 2021 at 1:11 pm #4788
webmaster
KeymasterI got it! O-)
I think your problems stem from the fact that your pwdate variable is constructed as a string but later on your IF items treat it like an integer. I’ve taken advantage of the extended “set” syntax to produce multiple variables from the one WMI item. The IF item compares the pwdate_raw variable against the “null” string to test if the wmi column contains any value or not. The last TEXT item uses the formatted pwdate variable for display.
INI12345678910# Create and define variable for Password Expiration Date "pwdate"WMI=color:#FFFB00,hidden:1,interval:60,font-size:115%,text:Password Expires,namespace:root\CIMV2, query:Win32_NetworkLoginProfile where UserType="Normal Account",maxrows:1, set:pwdate_raw=%PasswordExpires% pwdate=%PasswordExpires_month%/%PasswordExpires_day%/%PasswordExpires_year%,display:%PasswordExpires%# Display message if user is not connected to our network or VPNIf=value1:%pwdate_raw%,value2:<null>,comparator:eqCOMMENT=color:#FFFB00,font-size:125%,text:Connect to VPN to see your password expiration date# Display password expiration date if connected to our network or VPNIf=value1:%pwdate_raw%,value2:<null>,comparator:neTEXT=color:#FFFFFF,font-size:125%,text:Password Expires on,display:%pwdate%
-
24 November, 2021 at 2:12 am #4796
Arvis
ParticipantThank you! It still displays the message about connecting to VPN for a moment, but that’s not really much of an issue.
Is something similar happening here? This is our main issue because people on the correct domain are still seeing this after their computers have been migrated. We have moved 90% of our computers to the new domain and put this message up to catch the stragglers. Two people who didn’t need to be migrated saw the message and drove into the office for a migration, which they didn’t need.
We want the message to show only if they are 100% on the ourdomain.com domain.
Attachments:
-
24 November, 2021 at 4:34 am #4798
Arvis
ParticipantThis is what it looks like for about 10-60 seconds when I first open it. I tried to set the expire variable manually in the onload section so the IF statement can evaluate it immediately, but it still displays for awhile.
Attachments:
-
24 November, 2021 at 5:25 am #4800
Arvis
ParticipantI figured out what is going on. All CONTROL statements after an IF will display no matter what. If I change the exact same line to COMMENT it doesn’t display.
Attachments:
-
24 November, 2021 at 8:27 am #4802
webmaster
Keymastertry something like this:
INI123456# TEMPORARY notification to migrate computer if they are on the ourdomain.com domainIF=value1:%dmn%, value2:gov.dnvr, comparator:eqCONTROL=type:1,color:#FF6347,font-size:125%,display:AD Migration Required,uri:https://outlook.office365.com/owa/calendar/DomainMigration@contoso.onmicrosoft.com/bookings/IF=value1:%dmn%, value2:ourdomain.com, comparator:eqCONTROL=type:1,color:#FF6347,font-size:125%,display:Click here to schedule ASAP,uri:https://outlook.office365.com/owa/calendar/DomainMigration@contoso.onmicrosoft.com/bookings/DOMAIN=interval:5,color:ffffff,set:dmninitially, the dmn variable is empty so both IF items will fail and nothing is displayed. after 5 seconds the DOMAIN item is evaluated and the dmn variable is set
-
This reply was modified 5 months, 3 weeks ago by
.
-
This reply was modified 5 months, 3 weeks ago by
.
-
This reply was modified 5 months, 3 weeks ago by
.
-
This reply was modified 5 months, 3 weeks ago by
-
24 November, 2021 at 8:42 am #4808
Arvis
ParticipantIt still displays with the code you provided. I think it’s something with CONTROL. If I change those lines to COMMENT it will work properly.
I was mistaken in my first post in this thread. I was using CONTROL and not COMMENT. If I change all CONTROL lines after IF statements to COMMENT they all work perfectly, but I lose the ability to include links
Attaching another .zip. I don’t know why it’s not letting me post the code.
Attachments:
-
24 November, 2021 at 8:57 am #4815
webmaster
Keymasteri don’t see that behaviour. try v3.24
-
24 November, 2021 at 9:24 am #4819
Arvis
ParticipantI took out everything except two test lines. I’m attaching the ini and a video of the result. I downloaded 3.24 and replaced all files.
Attachments:
-
24 November, 2021 at 12:38 pm #4828
webmaster
Keymaster -
24 November, 2021 at 12:46 pm #4830
Arvis
ParticipantYou’re the best. Thank you so much! I will adjust our ini for now and add it back later.
-
-
AuthorPosts
- You must be logged in to reply to this topic.