|
Post by Teknowledgist on Feb 24, 2021 16:47:10 GMT
I have a conditional on an ActionGroup, but I want to see it when I'm testing the UI++ interface from the desktop, so I'm adding an additional condition:
<ActionGroup Name="FirstGroup" Condition='"%_SMSTSUserStarted%" = "True" OR "%_SMSTSAdvertID%" = ""'> While other actions/actiongroups display properly, the ActionGroup started above never displays when I run UI++ from the desktop. Even if I make the "%_SMSTSAdvertID%" = "" condition the only one, it doesn't show.
Shouldn't %_SMSTSAdvertID% evaluate to nothing so "" = "" evaluates true?
Thanks.
|
|
|
Post by Teknowledgist on Feb 25, 2021 18:03:18 GMT
Checking the logs, I see that references to non-existent variables (like _SMSTSAdvertID when not in a Task Sequence) don't evaluate at all. Their names are treated like strings, so my: "%_SMSTSAdvertID%" = "" evaluates literally to "%_SMSTSAdvertID%" = "". Did I miss that important detail in the documentation? (BTW, there are missing, trailing "%"s in the first example here.) So, maybe I can re-phrase the question... What additional condition can I place on action/actiongroup items so they run when UI++ is called outside of a task sequence (i.e. for testing)?
Thanks.
|
|
|
Post by Jason on Feb 28, 2021 3:23:13 GMT
Task sequence variables are completely unavailable outside of a task sequence in which case UI++ uses its own set of internal variables. This also means that any variables created and set by the task sequence engine aren't available.
To check whether or not UI++ is in a task sequence, you can literally check for what you called out above. Personally, I've used _SMSTSInWinPE and checked whether or not this is blank as, within a TS, this will always be populated to true or false.
Thank you for pointing out the doc issue as well.
|
|
|
Post by Teknowledgist on Mar 1, 2021 15:14:30 GMT
Of course, TS variables aren't available outside of a TS, but I would expect UI++ to evaluate references to variables that don't exist as empty strings or NULLs.
To check whether or not UI++ is in a task sequence, you can literally check for what you called out above. Personally, I've used _SMSTSInWinPE and checked whether or not this is blank as, within a TS, this will always be populated to true or false. One of us isn't understanding the other (which could very well be me not understanding!).
Are you saying that if I use:
"%_SMSTSAdvertID%" = "" as a condition on an action, it should evaluate to TRUE when running outside of a TS? If so, that is not what I'm experiencing. What I get is that the action does not run, and looking in the logs shows, literally:
* Evaluating Condition for <ActionGroup> : "%_SMSTSAdvertID%" = "" ?? "%_SMSTSAdvertID%" = "" when I would expect (based on what is in the log for other conditions) something like:
* Evaluating Condition for <ActionGroup> : "%_SMSTSAdvertID%" = "" ?? "" = "" If that is not what you meant, could you please explain with an example?
Thanks.
|
|
|
Post by Jason on Mar 2, 2021 4:24:15 GMT
Oh yuck. The above will/should work, but I found a code regression that I need to address. Will do that in my next build.
|
|
|
Post by Teknowledgist on Mar 4, 2021 19:01:35 GMT
|
|
|
Post by Jason on Mar 6, 2021 3:51:45 GMT
I think this is a result of the same code regression. I will be releasing a new build on Sunday (hopefully) that will address this.
|
|
|
Post by Teknowledgist on Mar 15, 2021 13:15:30 GMT
Any update on an estimated fix release?
|
|
|
Post by Jason on Mar 16, 2021 2:25:30 GMT
This slipped down my priority list. I'm updating the docs now and will be releasing shortly (tonight). Will be version 3.0.3.0.
|
|
|
Post by Teknowledgist on Mar 22, 2021 18:06:12 GMT
Thank you for the update. It does indeed fix the stand-alone testing problem in that the VB variable %_SMSTSAdvertID% is evaluating to an empty string (rather than a literal) when UI++ is called from the command line.
However, either it isn't working within a TaskSequence, or I'm not understanding something fundamental about Task Sequences...
When, from the Software Center, I start a Task Sequence in which UI++ is one of the early actions, this is what I see in the Log: * Evaluating Condition for <ActionGroup> : "%_SMSTSUserStarted%" = "True" OR "%_SMSTSInWinPE%" = "True" OR "%_SMSTSAdvertID%" = "" ?? "" = "True" OR "" = "True" OR "" = "" IOW, *all* the TS variables seem to not exist (i.e evaluate to an empty string) when UI++ is called from a Task Sequence too. If I use CTRL-F2 to open variables window, the "Read-only" tab is empty. Thus, shouldn't %_SMSTSUserStarted% equal TRUE and %_SMSTSInWinPE% equal FALSE (and %_SMSTSAdvertID% equal an empty string) because I started the TS from Software Center?
Thanks.
|
|
|
Post by Teknowledgist on Mar 24, 2021 15:42:56 GMT
OK. I have it working now. The problem was that I was calling the 32-bit UI++.exe with the 32-bit ServiceUI.exe (on a 64-bit system):
ServiceUI.exe -process:explorer.exe ui++.exe /config:AllStart.xml
Once I changed the task to:
ServiceUIx64.exe -process:explorer.exe ui++64.exe /config:AllStart.xml It works fine. I knew that the bitness of UI++ and ServiceUI had to be the same, but didn't realize that running and working could be different.
The 32-bit versions were starting, but had no TS variables. This is definitely something that should be mentioned in the documentation to save future knuckleheads like me from pulling our hair out.
I do still greatly appreciate all the work that goes into UI++.
Thanks.
|
|
|
Post by Jason on Mar 26, 2021 18:57:11 GMT
Thank you for the update and the kind words/encouragement.
|
|