Post by tiduseq on Jul 15, 2020 9:36:15 GMT
Hello,
Please see code below (marked important in BOLD RED). The variables editor shows the variable properly (HEM_Uipp_DeviceCheck has value 0) but in the preflight check (in log), it gets translated to True for no reason. I simply cut "HEM_" from variable name and magically it started working. So either there is some unknown character limit in variables, or adding second underscore _ character breaks it. I have no time to investigate exactly, the error is easy to replicate.
If it helps, I am running UI++ without TS currently, just double clicking the EXE.
FAILING
Found <ExternalCall> Action: 01/01/1601 00:00:00 0 (0x0000)
Initiating <ExternalCall> Action: 01/01/1601 00:00:00 0 (0x0000)
+ Running external command: PowerShell.exe -ExecutionPolicy ByPass -File ".\Check-Device.ps1". Maximum run time for this command is 60 seconds. 01/01/1601 00:00:00 0 (0x0000)
+ External command execution completed with exit code: 0. 01/01/1601 00:00:00 0 (0x0000)
+ Set the task sequence variable 'HEM_Uipp_DeviceCheck' to the value '0' 01/01/1601 00:00:00 0 (0x0000)
Found <ExternalCall> Action: 01/01/1601 00:00:00 0 (0x0000)
Initiating <ExternalCall> Action: 01/01/1601 00:00:00 0 (0x0000)
+ Running external command: PowerShell.exe -ExecutionPolicy ByPass -File ".\Check-VPNConnection.ps1". Maximum run time for this command is 60 seconds. 01/01/1601 00:00:00 0 (0x0000)
+ External command execution completed with exit code: 1. 01/01/1601 00:00:00 0 (0x0000)
+ Set the task sequence variable 'HEM_Uipp_VPN' to the value '1' 01/01/1601 00:00:00 0 (0x0000)
Found <Preflight> Action: 01/01/1601 00:00:00 0 (0x0000)
Initiating <Preflight> Action: 01/01/1601 00:00:00 0 (0x0000)
* Adding <Check>: No VPN Connection 01/01/1601 00:00:00 0 (0x0000)
* Evaluating Condition for <CheckCondition> No VPN Connection: %HEM_Uipp_VPN% = 0 ?? True = 0 01/01/1601 00:00:00 0 (0x0000)
= Condition evaluated to false 01/01/1601 00:00:00 0 (0x0000)
* Adding <Check>: Network cable connected False 01/01/1601 00:00:00 0 (0x0000)
* Evaluating Condition for <CheckCondition> Network cable connected False: %XWLANDisconnected% = "True" ?? False = "True" 01/01/1601 00:00:00 0 (0x0000)
= Condition evaluated to false 01/01/1601 00:00:00 0 (0x0000)
* Adding <Check>: AC connected instead of battery False 01/01/1601 00:00:00 0 (0x0000)
* Evaluating Condition for <CheckCondition> AC connected instead of battery False: %XOnBattery% = "False" ?? False = "False" 01/01/1601 00:00:00 0 (0x0000)
= Condition evaluated to true 01/01/1601 00:00:00 0 (0x0000)
* Adding <Check>: Supported computer model True 01/01/1601 00:00:00 0 (0x0000)
* Evaluating Condition for <CheckCondition> Supported computer model True: %HEM_Uipp_DeviceCheck% = 0 ?? True = 0 01/01/1601 00:00:00 0 (0x0000)
= Condition evaluated to false 01/01/1601 00:00:00 0 (0x0000)
> Cancel button pushed ... exiting UI++. 01/01/1601 00:00:00 0 (0x0000)
-- UI++ Finished ---------------------------------------- 01/01/1601 00:00:00 0 (0x0000)
Initiating <ExternalCall> Action: 01/01/1601 00:00:00 0 (0x0000)
+ Running external command: PowerShell.exe -ExecutionPolicy ByPass -File ".\Check-Device.ps1". Maximum run time for this command is 60 seconds. 01/01/1601 00:00:00 0 (0x0000)
+ External command execution completed with exit code: 0. 01/01/1601 00:00:00 0 (0x0000)
+ Set the task sequence variable 'HEM_Uipp_DeviceCheck' to the value '0' 01/01/1601 00:00:00 0 (0x0000)
Found <ExternalCall> Action: 01/01/1601 00:00:00 0 (0x0000)
Initiating <ExternalCall> Action: 01/01/1601 00:00:00 0 (0x0000)
+ Running external command: PowerShell.exe -ExecutionPolicy ByPass -File ".\Check-VPNConnection.ps1". Maximum run time for this command is 60 seconds. 01/01/1601 00:00:00 0 (0x0000)
+ External command execution completed with exit code: 1. 01/01/1601 00:00:00 0 (0x0000)
+ Set the task sequence variable 'HEM_Uipp_VPN' to the value '1' 01/01/1601 00:00:00 0 (0x0000)
Found <Preflight> Action: 01/01/1601 00:00:00 0 (0x0000)
Initiating <Preflight> Action: 01/01/1601 00:00:00 0 (0x0000)
* Adding <Check>: No VPN Connection 01/01/1601 00:00:00 0 (0x0000)
* Evaluating Condition for <CheckCondition> No VPN Connection: %HEM_Uipp_VPN% = 0 ?? True = 0 01/01/1601 00:00:00 0 (0x0000)
= Condition evaluated to false 01/01/1601 00:00:00 0 (0x0000)
* Adding <Check>: Network cable connected False 01/01/1601 00:00:00 0 (0x0000)
* Evaluating Condition for <CheckCondition> Network cable connected False: %XWLANDisconnected% = "True" ?? False = "True" 01/01/1601 00:00:00 0 (0x0000)
= Condition evaluated to false 01/01/1601 00:00:00 0 (0x0000)
* Adding <Check>: AC connected instead of battery False 01/01/1601 00:00:00 0 (0x0000)
* Evaluating Condition for <CheckCondition> AC connected instead of battery False: %XOnBattery% = "False" ?? False = "False" 01/01/1601 00:00:00 0 (0x0000)
= Condition evaluated to true 01/01/1601 00:00:00 0 (0x0000)
* Adding <Check>: Supported computer model True 01/01/1601 00:00:00 0 (0x0000)
* Evaluating Condition for <CheckCondition> Supported computer model True: %HEM_Uipp_DeviceCheck% = 0 ?? True = 0 01/01/1601 00:00:00 0 (0x0000)
= Condition evaluated to false 01/01/1601 00:00:00 0 (0x0000)
> Cancel button pushed ... exiting UI++. 01/01/1601 00:00:00 0 (0x0000)
-- UI++ Finished ---------------------------------------- 01/01/1601 00:00:00 0 (0x0000)
WORKING
Found <ExternalCall> Action: 01/01/1601 00:00:00 0 (0x0000)
Initiating <ExternalCall> Action: 01/01/1601 00:00:00 0 (0x0000)
+ Running external command: PowerShell.exe -ExecutionPolicy ByPass -File ".\Check-Device.ps1". Maximum run time for this command is 60 seconds. 01/01/1601 00:00:00 0 (0x0000)
+ External command execution completed with exit code: 0. 01/01/1601 00:00:00 0 (0x0000)
+ Set the task sequence variable 'Uipp_DeviceCheck' to the value '0' 01/01/1601 00:00:00 0 (0x0000)
Found <ExternalCall> Action: 01/01/1601 00:00:00 0 (0x0000)
Initiating <ExternalCall> Action: 01/01/1601 00:00:00 0 (0x0000)
+ Running external command: PowerShell.exe -ExecutionPolicy ByPass -File ".\Check-VPNConnection.ps1". Maximum run time for this command is 60 seconds. 01/01/1601 00:00:00 0 (0x0000)
+ External command execution completed with exit code: 1. 01/01/1601 00:00:00 0 (0x0000)
+ Set the task sequence variable 'Uipp_VPN' to the value '1' 01/01/1601 00:00:00 0 (0x0000)
Found <Preflight> Action: 01/01/1601 00:00:00 0 (0x0000)
Initiating <Preflight> Action: 01/01/1601 00:00:00 0 (0x0000)
* Adding <Check>: No VPN Connection 1 01/01/1601 00:00:00 0 (0x0000)
* Evaluating Condition for <CheckCondition> No VPN Connection 1: %Uipp_VPN% = 0 ?? 1 = 0 01/01/1601 00:00:00 0 (0x0000)
= Condition evaluated to false 01/01/1601 00:00:00 0 (0x0000)
* Adding <Check>: Network cable connected False 01/01/1601 00:00:00 0 (0x0000)
* Evaluating Condition for <CheckCondition> Network cable connected False: %XWLANDisconnected% = "True" ?? False = "True" 01/01/1601 00:00:00 0 (0x0000)
= Condition evaluated to false 01/01/1601 00:00:00 0 (0x0000)
* Adding <Check>: AC connected instead of battery False 01/01/1601 00:00:00 0 (0x0000)
* Evaluating Condition for <CheckCondition> AC connected instead of battery False: %XOnBattery% = "False" ?? False = "False" 01/01/1601 00:00:00 0 (0x0000)
= Condition evaluated to true 01/01/1601 00:00:00 0 (0x0000)
* Adding <Check>: Supported computer model 0 01/01/1601 00:00:00 0 (0x0000)
* Evaluating Condition for <CheckCondition> Supported computer model 0: %Uipp_DeviceCheck% = 0 ?? 0 = 0 01/01/1601 00:00:00 0 (0x0000)
= Condition evaluated to true 01/01/1601 00:00:00 0 (0x0000)
> Cancel button pushed ... exiting UI++. 01/01/1601 00:00:00 0 (0x0000)
-- UI++ Finished ---------------------------------------- 01/01/1601 00:00:00 0 (0x0000)
Initiating <ExternalCall> Action: 01/01/1601 00:00:00 0 (0x0000)
+ Running external command: PowerShell.exe -ExecutionPolicy ByPass -File ".\Check-Device.ps1". Maximum run time for this command is 60 seconds. 01/01/1601 00:00:00 0 (0x0000)
+ External command execution completed with exit code: 0. 01/01/1601 00:00:00 0 (0x0000)
+ Set the task sequence variable 'Uipp_DeviceCheck' to the value '0' 01/01/1601 00:00:00 0 (0x0000)
Found <ExternalCall> Action: 01/01/1601 00:00:00 0 (0x0000)
Initiating <ExternalCall> Action: 01/01/1601 00:00:00 0 (0x0000)
+ Running external command: PowerShell.exe -ExecutionPolicy ByPass -File ".\Check-VPNConnection.ps1". Maximum run time for this command is 60 seconds. 01/01/1601 00:00:00 0 (0x0000)
+ External command execution completed with exit code: 1. 01/01/1601 00:00:00 0 (0x0000)
+ Set the task sequence variable 'Uipp_VPN' to the value '1' 01/01/1601 00:00:00 0 (0x0000)
Found <Preflight> Action: 01/01/1601 00:00:00 0 (0x0000)
Initiating <Preflight> Action: 01/01/1601 00:00:00 0 (0x0000)
* Adding <Check>: No VPN Connection 1 01/01/1601 00:00:00 0 (0x0000)
* Evaluating Condition for <CheckCondition> No VPN Connection 1: %Uipp_VPN% = 0 ?? 1 = 0 01/01/1601 00:00:00 0 (0x0000)
= Condition evaluated to false 01/01/1601 00:00:00 0 (0x0000)
* Adding <Check>: Network cable connected False 01/01/1601 00:00:00 0 (0x0000)
* Evaluating Condition for <CheckCondition> Network cable connected False: %XWLANDisconnected% = "True" ?? False = "True" 01/01/1601 00:00:00 0 (0x0000)
= Condition evaluated to false 01/01/1601 00:00:00 0 (0x0000)
* Adding <Check>: AC connected instead of battery False 01/01/1601 00:00:00 0 (0x0000)
* Evaluating Condition for <CheckCondition> AC connected instead of battery False: %XOnBattery% = "False" ?? False = "False" 01/01/1601 00:00:00 0 (0x0000)
= Condition evaluated to true 01/01/1601 00:00:00 0 (0x0000)
* Adding <Check>: Supported computer model 0 01/01/1601 00:00:00 0 (0x0000)
* Evaluating Condition for <CheckCondition> Supported computer model 0: %Uipp_DeviceCheck% = 0 ?? 0 = 0 01/01/1601 00:00:00 0 (0x0000)
= Condition evaluated to true 01/01/1601 00:00:00 0 (0x0000)
> Cancel button pushed ... exiting UI++. 01/01/1601 00:00:00 0 (0x0000)
-- UI++ Finished ---------------------------------------- 01/01/1601 00:00:00 0 (0x0000)